-- SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Sarah Vaupel <vaupel.sarah@campus.lmu.de>
--
-- SPDX-License-Identifier: AGPL-3.0-or-later

Tutorial json
    name            TutorialName
    course          CourseId OnDeleteCascade OnUpdateCascade
    type            (CI Text) -- "Tutorium", "Zentralübung", ...
    capacity        Int Maybe -- limit for enrolment in this tutorial
    room            RoomReference Maybe
    roomHidden      Bool default=false
    time            Occurrences
    regGroup        (CI Text) Maybe -- each participant may register for one tutorial per regGroup
    registerFrom    UTCTime Maybe
    registerTo      UTCTime Maybe
    deregisterUntil UTCTime Maybe
    lastChanged     UTCTime default=now()
    tutorControlled Bool default=false
    UniqueTutorial course name
    deriving Generic
Tutor
    tutorial    TutorialId OnDeleteCascade OnUpdateCascade
    user        UserId
    UniqueTutor tutorial user
    deriving Generic
TutorialParticipant
    tutorial    TutorialId OnDeleteCascade OnUpdateCascade
    user        UserId
    UniqueTutorialParticipant tutorial user
    deriving Eq Ord Show
    deriving Generic