"""API schemas (Pydantic) for PlannedDayExclusion. Schemas are the API boundary — they validate request bodies and shape responses, kept separate from the domain entity so the wire format can evolve independently. """ from datetime import date, datetime from uuid import UUID from pydantic import BaseModel from app.entities.planned_day_exclusion import PlannedDayExclusion class PlannedDayExclusionCreate(BaseModel): workspace_id: UUID child_id: UUID parent_personal_data_uuid: UUID date: date class PlannedDayExclusionResponse(BaseModel): id: UUID workspace_id: UUID child_id: UUID parent_personal_data_uuid: UUID date: date created_at: datetime | None updated_at: datetime | None @classmethod def from_entity(cls, entity: PlannedDayExclusion) -> "PlannedDayExclusionResponse": return cls( id=entity.id, workspace_id=entity.workspace_id, child_id=entity.child_id, parent_personal_data_uuid=entity.parent_personal_data_uuid, date=entity.date, created_at=entity.created_at, updated_at=entity.updated_at, )