"""Domain entity: DayOverride. Workspace-scoped user correction to the calendar cache (`app/data/swedish_calendar.json`) / `holidays` fallback. Workplaces differ: some give klämdagar off, some require working julafton. A `DayOverride` lets a workspace say "the calendar is wrong for us on this date" in either direction — see `app.services.allocation_service.is_free_day`, which is the single place the override is applied on top of the calendar. """ from dataclasses import dataclass from datetime import date, datetime from uuid import UUID @dataclass class DayOverride: """A single-date correction to the effective calendar for a workspace. `is_working_day=False` means "we are off this day" (e.g. the employer gives klämdagar off); `is_working_day=True` means "we must work this day despite the calendar" (e.g. julafton is a normal workday here). """ id: UUID workspace_id: UUID date: date is_working_day: bool note: str | None = None created_at: datetime | None = None updated_at: datetime | None = None