Model as Discussed
This commit is contained in:
parent
8fc45cfd23
commit
008f7b0db4
@ -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
|
||||
name Text
|
||||
shorthand Text
|
||||
UniqueSchool name
|
||||
deriving Eq
|
||||
Degree json
|
||||
@ -38,22 +36,24 @@ 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
|
||||
UniqueLecturer userId courseId
|
||||
CourseParticipant
|
||||
userId UserId
|
||||
courseId CourseId
|
||||
registration UTCTime
|
||||
userId UserId
|
||||
courseId CourseId
|
||||
registration UTCTime
|
||||
UniqueCourseParticipant userId courseId
|
||||
Sheet
|
||||
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
|
||||
sheetId SheetId
|
||||
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
|
||||
@ -101,8 +108,8 @@ SubmissionGroup
|
||||
createdBy UserId
|
||||
changedBy UserId
|
||||
SubmissionGroupUser
|
||||
submissionGroupId SubmissionGroupId
|
||||
userId UserId
|
||||
submissionGroupId SubmissionGroupId
|
||||
userId UserId
|
||||
UniqueSubmissionGroupUser submissionGroupId userId
|
||||
Tutorial json
|
||||
name Text
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user