module Utils.Schedule.Types.ScheduleEntry
  ( ScheduleEntry(..)
  ) where

import Import


data ScheduleEntry = ScheduleCourseEvent
                     { sceCourse     :: Entity Course
                     , sceType       :: CourseEventType
                     , sceRoom       :: Maybe RoomReference
                     , sceShowRoom   :: Bool
                     , sceOccurrence :: Either OccurrenceException OccurrenceSchedule
                     , sceNoOccur    :: Set LocalTime
                     , sceTerm       :: Entity Term
                     }
                   | ScheduleTutorial
                     { stCourse      :: Entity Course
                     , stName        :: TutorialName
                     , stType        :: TutorialType
                     , stRoom        :: Maybe RoomReference
                     , stShowRoom    :: Bool
                     , stOccurrence  :: Either OccurrenceException OccurrenceSchedule
                     , stNoOccur     :: Set LocalTime
                     , stTerm        :: Entity Term
                     }
                   | ScheduleExamOccurrence
                     { seoCourse     :: Entity Course
                     , seoExamName   :: ExamName
                     , seoRooms      :: Set (Maybe RoomReference, Bool)
                     , seoStart      :: UTCTime
                     , seoEnd        :: Maybe UTCTime
                     }
  deriving (Generic, Typeable)
