import dataclasses
import datetime
import enum
from typing import Optional

DEFAULT_START_TIME = datetime.time(20, 30)
DEFAULT_END_TIME = datetime.time(22, 30)


@dataclasses.dataclass
class SessionVenue:
    name: Optional[str] = None
    url: Optional[str] = None


@dataclasses.dataclass
class Session:
    id: Optional[int] = None
    date: datetime.date = dataclasses.field(default_factory=datetime.date.today)
    start_time: datetime.time = DEFAULT_START_TIME
    end_time: datetime.time = DEFAULT_END_TIME
    venue: SessionVenue = dataclasses.field(default_factory=SessionVenue)
    is_live: bool = False


@dataclasses.dataclass
class DateNames:
    day_name: str
    day: str
    month_name: str
    year: str


class SessionCols(enum.Enum):
    DATE = "date"
