Model as Discussed

This commit is contained in:
SJost 2017-10-04 11:18:07 +02:00
parent 8fc45cfd23
commit 008f7b0db4

View File

@ -8,23 +8,21 @@ Email
userId UserId Maybe
verkey Text Maybe
UniqueEmail email
Comment json -- Adding "json" causes ToJSON and FromJSON instances to be derived.
message Text
userId UserId Maybe
deriving Eq
deriving Show
--
-- above from Template, needs editing
--
Term json
name Text
start UTCTime
end UTCTime
holidays [UTCTime]
UniqueTerm name
shorthand Text
start Day
end Day
holidays [Day]
-- UniqueTerm shorthand
Primary shorthand
deriving Eq
School json
name Text
shorthand Text
UniqueSchool name
deriving Eq
Degree json
@ -38,14 +36,16 @@ DegreeCourse json
UniqueDegreeCourse degreeId courseId
Course json
name Text
shorthand Text
owner UserId
schoolId SchoolId
termId TermId Maybe
termId TermId -- TermId ist jetzt Text als Typ
capacity Int Maybe
created UTCTime
changed UTCTime
registerFrom UTCTime
registerTo UTCTime
UniqueTermShorthand shorthand termId
Lecturer
userId UserId
courseId CourseId
@ -77,9 +77,12 @@ Sheet
File
title Text
content ByteString
created UTCTime
changed UTCTime
createdBy UserId
changedBy UserId
Submission
sheetId SheetId
fileId FileId
updateId FileId Maybe
ratingBy UserId Maybe
ratingPoints Double Maybe
@ -89,6 +92,10 @@ Submission
changed UTCTime
createdBy UserId
changedBy UserId
SubmissionFile
submissionId SubmissionId
fileId FileId
UniqueSubmissionFile fileId submissionId
SubmissionUser
userId UserId
submissionId SubmissionId
@ -116,22 +123,28 @@ Booking
begin UTCTime
end UTCTime
weekly Bool
exceptions [UTCTime]
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
RoomCourse
-- BookingRoom
-- subject RoomForId
-- roomId RoomId
-- bookingId BookingId
-- UniqueRoomCourse subject roomId bookingId
+RoomFor
courseId CourseId
tutorialId TutorialId Maybe
examId ExamId Maybe
roomId RoomId
bookingId BookingId
UniqueRoomCourse courseId roomId bookingId
tutorialId TutorialId
examId ExamId
-- data RoomFor = RoomForCourseIdSum CourseId | RoomForTutorialIdSum TutorialId ...
Exam
courseId CourseId
name Text
@ -153,3 +166,4 @@ ExamUser
-- 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)