Datanbank: Model cleanup

This commit is contained in:
SJost 2018-04-03 16:20:29 +02:00
parent 9a26d17c5e
commit ebf4c841eb
2 changed files with 21 additions and 20 deletions

View File

@ -101,7 +101,7 @@ psql -U uniworx -d uniworx -h 127.0.0.1 -w
\dt \dt
--Zeige Tabellen Inhalt: --Zeige Tabellen Inhalt:
TABEL "user"; TABLE "user";
-- Die Anführungszeichen können manchmal weggelassen werden, aber -- Die Anführungszeichen können manchmal weggelassen werden, aber
-- bei user sind sie notwendig, da es auch Schlüsselwort in sql ist. -- bei user sind sie notwendig, da es auch Schlüsselwort in sql ist.

39
models
View File

@ -44,15 +44,11 @@ School json
shorthand Text shorthand Text
UniqueSchool name UniqueSchool name
deriving Eq deriving Eq
Degree json
name Text
schoolId SchoolId
UniqueDegree name schoolId
deriving Eq
DegreeCourse json DegreeCourse json
degreeId DegreeId course CourseId
courseId CourseId degree StudyDegreeId
UniqueDegreeCourse degreeId courseId terms StudyTermsId
UniqueDegreeCourse course degree terms
Course Course
name Text name Text
description Html Maybe description Html Maybe
@ -69,6 +65,10 @@ CourseEdit
user UserId user UserId
time UTCTime time UTCTime
course CourseId course CourseId
CourseFavourite
user UserId
time UTCTime
course CourseId
Lecturer Lecturer
userId UserId userId UserId
courseId CourseId courseId CourseId
@ -154,7 +154,7 @@ SubmissionGroupUser
Tutorial json Tutorial json
name Text name Text
tutor UserId tutor UserId
course CourseId -- ? course CourseId
TutorialUser TutorialUser
userId UserId userId UserId
tutorialId TutorialId tutorialId TutorialId
@ -185,6 +185,7 @@ Room
tutorialId TutorialId tutorialId TutorialId
examId ExamId examId ExamId
-- data RoomFor = RoomForCourseIdSum CourseId | RoomForTutorialIdSum TutorialId ... -- data RoomFor = RoomForCourseIdSum CourseId | RoomForTutorialIdSum TutorialId ...
-- EXAMS ARE TODO:
Exam Exam
courseId CourseId courseId CourseId
name Text name Text
@ -196,13 +197,13 @@ Exam
deregistrationEnd UTCTime deregistrationEnd UTCTime
ratingVisible Bool ratingVisible Bool
statisticsVisible Bool statisticsVisible Bool
ExamEdit --ExamEdit
user UserId -- user UserId
time UTCTime -- time UTCTime
exam ExamId -- exam ExamId
ExamUser --ExamUser
userId UserId -- userId UserId
examId ExamId -- examId ExamId
-- CONTINUE HERE: Include rating in this table or separately? -- -- CONTINUE HERE: Include rating in this table or separately?
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)