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

import Import

import qualified Database.Esqueleto as E

import Utils.Schedule.Types.ScheduleEntry        as Utils.Schedule.Types
import Utils.Schedule.Types.ScheduleView         as Utils.Schedule.Types
import Utils.Schedule.Types.ScheduleOffset       as Utils.Schedule.Types
import Utils.Schedule.Types.ScheduleOptions      as Utils.Schedule.Types


-- TODO: replace Info types with one joined type and fetch info in one single runDB

type ScheduleCourseEventInfo          = ( Entity Course
                                        , Entity CourseEvent
                                        , E.Value Bool           -- showRoom
                                        )

type ScheduleTutorialInfo             = ( Entity Course
                                        , Entity Tutorial
                                        , E.Value Bool           -- showRoom
                                        )

type ScheduleExamOccurrenceInfo       = ( Entity Course
                                        , Entity Exam
                                        , Entity ExamOccurrence
                                        , E.Value Bool           -- showRoom
                                        )
type ScheduleExamOccurrenceJoinedInfo = ( Entity Course
                                        , Entity Exam
                                        , NonEmpty ( Entity ExamOccurrence
                                                   , E.Value Bool           -- showRoom
                                                   )
                                        )
