Safe Haskell | None |
---|---|
Language | Haskell2010 |
Basic database schema for exigo tools.
The assumption is that the schema will actually be composed of this, base, schema, plus subsidiary ones for individual assessments.
Synopsis
- data Student = Student {
- studentStudNo :: !Text
- studentName :: !Text
- type StudentId = Key Student
- data Submission = Submission {}
- type SubmissionId = Key Submission
- data LatePenalty = LatePenalty {
- latePenaltyStudent :: !(Key Student)
- latePenaltyDaysLate :: !Int
- type LatePenaltyId = Key LatePenalty
- savedMainModel :: [EntityDef]
- data family Key record :: Type
- type StudentKey = Key Student
- type SubmissionKey = Key Submission
- type LatePenaltyKey = Key LatePenalty
- pattern StudentId :: () => typ ~ StudentId => EntityField Student typ
- pattern SubmissionId :: () => typ ~ SubmissionId => EntityField Submission typ
- pattern LatePenaltyId :: () => typ ~ LatePenaltyId => EntityField LatePenalty typ
- pattern StudentStudNo :: () => typ ~ Text => EntityField Student typ
- pattern StudentName :: () => typ ~ Text => EntityField Student typ
- pattern SubmissionStudent :: () => typ ~ Key Student => EntityField Submission typ
- pattern SubmissionStudentLogin :: () => typ ~ Text => EntityField Submission typ
- pattern SubmissionPath :: () => typ ~ FilePath => EntityField Submission typ
- pattern LatePenaltyStudent :: () => typ ~ Key Student => EntityField LatePenalty typ
- pattern LatePenaltyDaysLate :: () => typ ~ Int => EntityField LatePenalty typ
- pattern StudentKey :: Text -> Key Student
- pattern SubmissionKey :: StudentId -> Key Submission
- pattern LatePenaltyKey :: StudentId -> Key LatePenalty
- unStudentKey :: Key Student -> Text
- unLatePenaltyKey :: Key LatePenalty -> StudentId
- unSubmissionKey :: Key Submission -> StudentId
- type SubmissionKey = Key Submission
- type LatePenaltyKey = Key LatePenalty
- type StudentKey = Key Student
- type LatePenaltyId = Key LatePenalty
- data LatePenalty = LatePenalty {
- latePenaltyStudent :: !(Key Student)
- latePenaltyDaysLate :: !Int
- type SubmissionId = Key Submission
- data Submission = Submission {}
- type StudentId = Key Student
- data Student = Student {
- studentStudNo :: !Text
- studentName :: !Text
- savedMainModel :: [EntityDef]
Database entities
Represents a student
Student | |
|
Instances
Submission made by a Student
data Submission Source #
Submission | |
|
Instances
type SubmissionId = Key Submission Source #
A late penalty applied
data LatePenalty Source #
Instances
type LatePenaltyId = Key LatePenalty Source #
Runtime access to schema
Saved entities from this schema
savedMainModel :: [EntityDef] Source #
Keys for entities
data family Key record :: Type #
Instances
type StudentKey = Key Student Source #
type SubmissionKey = Key Submission Source #
type LatePenaltyKey = Key LatePenalty Source #
Instances
pattern SubmissionId :: () => typ ~ SubmissionId => EntityField Submission typ Source #
pattern LatePenaltyId :: () => typ ~ LatePenaltyId => EntityField LatePenalty typ Source #
pattern StudentStudNo :: () => typ ~ Text => EntityField Student typ Source #
pattern StudentName :: () => typ ~ Text => EntityField Student typ Source #
pattern SubmissionStudent :: () => typ ~ Key Student => EntityField Submission typ Source #
pattern SubmissionStudentLogin :: () => typ ~ Text => EntityField Submission typ Source #
pattern SubmissionPath :: () => typ ~ FilePath => EntityField Submission typ Source #
pattern LatePenaltyStudent :: () => typ ~ Key Student => EntityField LatePenalty typ Source #
pattern LatePenaltyDaysLate :: () => typ ~ Int => EntityField LatePenalty typ Source #
pattern SubmissionKey :: StudentId -> Key Submission Source #
pattern LatePenaltyKey :: StudentId -> Key LatePenalty Source #
unSubmissionKey :: Key Submission -> StudentId Source #
type SubmissionKey = Key Submission Source #
type LatePenaltyKey = Key LatePenalty Source #
type StudentKey = Key Student Source #
type LatePenaltyId = Key LatePenalty Source #
data LatePenalty Source #
Instances
type SubmissionId = Key Submission Source #
data Submission Source #
Submission | |
|
Instances
Student | |
|
Instances
savedMainModel :: [EntityDef] Source #