import datetime

from pydantic import BaseModel


class Model(BaseModel):
    class Config:
        use_enum_values = True


class Channel(Model):
    id: str
    name: str
    provider: str


class ScheduleValue(Model):
    start: datetime.datetime
    end: datetime.datetime
    label: str
    category: str | None = None
    live: bool = False


class Schedule(Model):
    channel: Channel
    date: datetime.date
    values: list[ScheduleValue]
