Model as Discussed
This commit is contained in:
parent
8fc45cfd23
commit
008f7b0db4
@ -8,23 +8,21 @@ Email
|
|||||||
userId UserId Maybe
|
userId UserId Maybe
|
||||||
verkey Text Maybe
|
verkey Text Maybe
|
||||||
UniqueEmail email
|
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
|
-- above from Template, needs editing
|
||||||
--
|
--
|
||||||
Term json
|
Term json
|
||||||
name Text
|
name Text
|
||||||
start UTCTime
|
shorthand Text
|
||||||
end UTCTime
|
start Day
|
||||||
holidays [UTCTime]
|
end Day
|
||||||
UniqueTerm name
|
holidays [Day]
|
||||||
|
-- UniqueTerm shorthand
|
||||||
|
Primary shorthand
|
||||||
deriving Eq
|
deriving Eq
|
||||||
School json
|
School json
|
||||||
name Text
|
name Text
|
||||||
|
shorthand Text
|
||||||
UniqueSchool name
|
UniqueSchool name
|
||||||
deriving Eq
|
deriving Eq
|
||||||
Degree json
|
Degree json
|
||||||
@ -38,22 +36,24 @@ DegreeCourse json
|
|||||||
UniqueDegreeCourse degreeId courseId
|
UniqueDegreeCourse degreeId courseId
|
||||||
Course json
|
Course json
|
||||||
name Text
|
name Text
|
||||||
|
shorthand Text
|
||||||
owner UserId
|
owner UserId
|
||||||
schoolId SchoolId
|
schoolId SchoolId
|
||||||
termId TermId Maybe
|
termId TermId -- TermId ist jetzt Text als Typ
|
||||||
capacity Int Maybe
|
capacity Int Maybe
|
||||||
created UTCTime
|
created UTCTime
|
||||||
changed UTCTime
|
changed UTCTime
|
||||||
registerFrom UTCTime
|
registerFrom UTCTime
|
||||||
registerTo UTCTime
|
registerTo UTCTime
|
||||||
|
UniqueTermShorthand shorthand termId
|
||||||
Lecturer
|
Lecturer
|
||||||
userId UserId
|
userId UserId
|
||||||
courseId CourseId
|
courseId CourseId
|
||||||
UniqueLecturer userId courseId
|
UniqueLecturer userId courseId
|
||||||
CourseParticipant
|
CourseParticipant
|
||||||
userId UserId
|
userId UserId
|
||||||
courseId CourseId
|
courseId CourseId
|
||||||
registration UTCTime
|
registration UTCTime
|
||||||
UniqueCourseParticipant userId courseId
|
UniqueCourseParticipant userId courseId
|
||||||
Sheet
|
Sheet
|
||||||
courseId CourseId
|
courseId CourseId
|
||||||
@ -77,9 +77,12 @@ Sheet
|
|||||||
File
|
File
|
||||||
title Text
|
title Text
|
||||||
content ByteString
|
content ByteString
|
||||||
|
created UTCTime
|
||||||
|
changed UTCTime
|
||||||
|
createdBy UserId
|
||||||
|
changedBy UserId
|
||||||
Submission
|
Submission
|
||||||
sheetId SheetId
|
sheetId SheetId
|
||||||
fileId FileId
|
|
||||||
updateId FileId Maybe
|
updateId FileId Maybe
|
||||||
ratingBy UserId Maybe
|
ratingBy UserId Maybe
|
||||||
ratingPoints Double Maybe
|
ratingPoints Double Maybe
|
||||||
@ -89,6 +92,10 @@ Submission
|
|||||||
changed UTCTime
|
changed UTCTime
|
||||||
createdBy UserId
|
createdBy UserId
|
||||||
changedBy UserId
|
changedBy UserId
|
||||||
|
SubmissionFile
|
||||||
|
submissionId SubmissionId
|
||||||
|
fileId FileId
|
||||||
|
UniqueSubmissionFile fileId submissionId
|
||||||
SubmissionUser
|
SubmissionUser
|
||||||
userId UserId
|
userId UserId
|
||||||
submissionId SubmissionId
|
submissionId SubmissionId
|
||||||
@ -101,8 +108,8 @@ SubmissionGroup
|
|||||||
createdBy UserId
|
createdBy UserId
|
||||||
changedBy UserId
|
changedBy UserId
|
||||||
SubmissionGroupUser
|
SubmissionGroupUser
|
||||||
submissionGroupId SubmissionGroupId
|
submissionGroupId SubmissionGroupId
|
||||||
userId UserId
|
userId UserId
|
||||||
UniqueSubmissionGroupUser submissionGroupId userId
|
UniqueSubmissionGroupUser submissionGroupId userId
|
||||||
Tutorial json
|
Tutorial json
|
||||||
name Text
|
name Text
|
||||||
@ -116,22 +123,28 @@ Booking
|
|||||||
begin UTCTime
|
begin UTCTime
|
||||||
end UTCTime
|
end UTCTime
|
||||||
weekly Bool
|
weekly Bool
|
||||||
exceptions [UTCTime]
|
exceptions [Day] -- only if weekly, begin in exception
|
||||||
created UTCTime
|
created UTCTime
|
||||||
changed UTCTime
|
changed UTCTime
|
||||||
createdBy UserId
|
createdBy UserId
|
||||||
changedBy UserId
|
changedBy UserId
|
||||||
|
|
||||||
|
bookedFor RoomForId
|
||||||
|
room RoomId
|
||||||
Room
|
Room
|
||||||
name Text
|
name Text
|
||||||
capacity Int Maybe
|
capacity Int Maybe
|
||||||
building Text
|
building Text
|
||||||
RoomCourse
|
-- BookingRoom
|
||||||
|
-- subject RoomForId
|
||||||
|
-- roomId RoomId
|
||||||
|
-- bookingId BookingId
|
||||||
|
-- UniqueRoomCourse subject roomId bookingId
|
||||||
|
+RoomFor
|
||||||
courseId CourseId
|
courseId CourseId
|
||||||
tutorialId TutorialId Maybe
|
tutorialId TutorialId
|
||||||
examId ExamId Maybe
|
examId ExamId
|
||||||
roomId RoomId
|
-- data RoomFor = RoomForCourseIdSum CourseId | RoomForTutorialIdSum TutorialId ...
|
||||||
bookingId BookingId
|
|
||||||
UniqueRoomCourse courseId roomId bookingId
|
|
||||||
Exam
|
Exam
|
||||||
courseId CourseId
|
courseId CourseId
|
||||||
name Text
|
name Text
|
||||||
@ -153,3 +166,4 @@ ExamUser
|
|||||||
-- CONTINUE HERE: Inlcude rating in this table or seperatly?
|
-- CONTINUE HERE: Inlcude rating in this table or seperatly?
|
||||||
UniqueExamUser userId examId
|
UniqueExamUser userId examId
|
||||||
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user