24 lines
1.0 KiB
Plaintext
24 lines
1.0 KiB
Plaintext
-- SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>,Steffen Jost <jost@tcs.ifi.lmu.de>
|
|
--
|
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
-- | 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 |