from datetime import date, datetime

from pydantic import BaseModel, Field


class BusylightTokenStatus(BaseModel):
    configured: bool
    created_at: datetime | None = None


class BusylightTokenRotated(BaseModel):
    token: str = Field(..., description="Klartext-Token, wird nur einmal angezeigt.")
    created_at: datetime


class BusylightAbsenceItem(BaseModel):
    type: str
    category: str


class BusylightUserItem(BaseModel):
    personnel_number: str
    full_name: str
    absences_today: list[BusylightAbsenceItem]


class BusylightUsersResponse(BaseModel):
    date: date
    users: list[BusylightUserItem]
