-- | Describes each term time.
-- 
-- `TermIdentifier` is either `Winter` or `Summer` and a Year (`Integer`)
Term json
    name          TermIdentifier -- unTermKey :: TermId -> TermIdentifier
    start         Day            -- TermKey   :: TermIdentifier -> TermId
    end           Day
    holidays      [Day]          -- LMU holidays, for display in timetables
    lectureStart  Day            -- lectures usually start/end  later/earlier than the actual term,
    lectureEnd    Day            -- used to generate warnings for lecturers creating unusual courses
    Primary name       -- newtype Key Term = TermKey { unTermKey :: TermIdentifier }
    deriving Show Eq Generic -- type TermId = Key Term

-- | May lecturers add courses to this term?
TermActive
    term          TermId
    from          UTCTime
    to            UTCTime Maybe
    for           UserId Maybe
    deriving Show Eq Generic