"""Domain entity: PlannedLeaveDay (a single calendar day of planned leave).""" from dataclasses import dataclass from datetime import date, datetime from uuid import UUID @dataclass class PlannedLeaveDay: id: UUID workspace_id: UUID child_id: UUID parent_personal_data_uuid: UUID date: date day_type: str # 'sjukpenning' | 'lagsta' | 'vacation' is_dubbeldag: bool = False # True → counts against the 60-day dubbeldagar quota # Which `LeaveWish` produced this day (nullable: ad-hoc/legacy/unattributable # days have none). Lets the UI click a multi-day band on a calendar and edit # it as one period instead of one day at a time. wish_id: UUID | None = None # True once the user hand-edits this day. A later task makes the allocator # refuse to retype a pinned day on replan; this field only carries that # state through the stack so far. is_pinned: bool = False created_at: datetime | None = None updated_at: datetime | None = None