159 lines
4.2 KiB
Plaintext
159 lines
4.2 KiB
Plaintext
User
|
|
plugin Text
|
|
ident Text
|
|
UniqueAuthentication plugin ident
|
|
Term json
|
|
name TermIdentifier
|
|
start Day
|
|
end Day
|
|
holidays [Day]
|
|
-- UniqueTerm shorthand
|
|
Primary name
|
|
deriving Show
|
|
School json
|
|
name Text
|
|
shorthand Text
|
|
UniqueSchool name
|
|
deriving Eq
|
|
Degree json
|
|
name Text
|
|
schoolId SchoolId
|
|
UniqueDegree name schoolId
|
|
deriving Eq
|
|
DegreeCourse json
|
|
degreeId DegreeId
|
|
courseId CourseId
|
|
UniqueDegreeCourse degreeId courseId
|
|
Course json
|
|
name Text
|
|
shorthand Text
|
|
owner UserId
|
|
schoolId SchoolId
|
|
termId TermId -- @data TermId = TermId TermIdentifier@ stored as text
|
|
capacity Int Maybe
|
|
created UTCTime
|
|
changed UTCTime
|
|
registerFrom UTCTime
|
|
registerTo UTCTime
|
|
UniqueTermShorthand shorthand termId
|
|
Lecturer
|
|
userId UserId
|
|
courseId CourseId
|
|
UniqueLecturer userId courseId
|
|
CourseParticipant
|
|
userId UserId
|
|
courseId CourseId
|
|
registration UTCTime
|
|
UniqueCourseParticipant userId courseId
|
|
Sheet
|
|
courseId CourseId
|
|
name Text
|
|
sheetType SheetType
|
|
maxPoints Double Maybe
|
|
requiredPoints Double Maybe
|
|
markingText Text
|
|
activeFrom UTCTime
|
|
activeTo UTCTime
|
|
hintFrom UTCTime Maybe
|
|
solutionFrom UTCTime Maybe
|
|
created UTCTime
|
|
changed UTCTime
|
|
createdBy UserId
|
|
changedBy UserId
|
|
SheetFile
|
|
sheetId SheetId
|
|
fileId FileId
|
|
type SheetFileType
|
|
UniqueSheetFile fileId sheetId type
|
|
File
|
|
title FilePath
|
|
content ByteString Maybe -- Nothing iff this is a directory
|
|
modified UTCTime
|
|
deriving Show Eq Ord
|
|
Submission
|
|
sheetId SheetId
|
|
ratingBy UserId Maybe
|
|
ratingPoints Double Maybe
|
|
ratingComment Text Maybe
|
|
rated UTCTime Maybe
|
|
created UTCTime
|
|
changed UTCTime
|
|
createdBy UserId
|
|
changedBy UserId
|
|
SubmissionFile
|
|
submissionId SubmissionId
|
|
fileId FileId
|
|
isUpdate Bool
|
|
UniqueSubmissionFile fileId submissionId isUpdate
|
|
SubmissionUser
|
|
userId UserId
|
|
submissionId SubmissionId
|
|
UniqueSubmissionUser userId submissionId
|
|
SubmissionGroup
|
|
courseId CourseId
|
|
name Text
|
|
created UTCTime
|
|
changed UTCTime
|
|
createdBy UserId
|
|
changedBy UserId
|
|
SubmissionGroupUser
|
|
submissionGroupId SubmissionGroupId
|
|
userId UserId
|
|
UniqueSubmissionGroupUser submissionGroupId userId
|
|
Tutorial json
|
|
name Text
|
|
tutor UserId
|
|
TutorialUser
|
|
userId UserId
|
|
tutorialId TutorialId
|
|
UniqueTutorialUser userId tutorialId
|
|
Booking
|
|
termId TermId
|
|
begin UTCTime
|
|
end UTCTime
|
|
weekly Bool
|
|
exceptions [Day] -- only if weekly, begin in exception
|
|
created UTCTime
|
|
changed UTCTime
|
|
createdBy UserId
|
|
changedBy UserId
|
|
|
|
bookedFor RoomForId
|
|
room RoomId
|
|
Room
|
|
name Text
|
|
capacity Int Maybe
|
|
building Text
|
|
-- BookingRoom
|
|
-- subject RoomForId
|
|
-- roomId RoomId
|
|
-- bookingId BookingId
|
|
-- UniqueRoomCourse subject roomId bookingId
|
|
+RoomFor
|
|
courseId CourseId
|
|
tutorialId TutorialId
|
|
examId ExamId
|
|
-- data RoomFor = RoomForCourseIdSum CourseId | RoomForTutorialIdSum TutorialId ...
|
|
Exam
|
|
courseId CourseId
|
|
name Text
|
|
description Text
|
|
begin UTCTime
|
|
end UTCTime
|
|
registrationBegin UTCTime
|
|
registrationEnd UTCTime
|
|
deregistrationEnd UTCTime
|
|
ratingVisible Bool
|
|
statisticsVisible Bool
|
|
created UTCTime
|
|
changed UTCTime
|
|
createdBy UserId
|
|
changedBy UserId
|
|
ExamUser
|
|
userId UserId
|
|
examId ExamId
|
|
-- CONTINUE HERE: Inlcude rating in this table or seperatly?
|
|
UniqueExamUser userId examId
|
|
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|
|
|