Initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
"""Abstract repository for PlannedLeaveDay calendar events."""
|
||||
|
||||
from abc import abstractmethod
|
||||
from datetime import date
|
||||
from uuid import UUID
|
||||
|
||||
from app.entities.planned_leave import PlannedLeaveDay
|
||||
from app.repositories.base import Repository
|
||||
|
||||
|
||||
class PlannedLeaveRepository(Repository[PlannedLeaveDay]):
|
||||
@abstractmethod
|
||||
async def list_by_workspace_child(
|
||||
self,
|
||||
workspace_id: UUID,
|
||||
child_id: UUID,
|
||||
from_date: date | None = None,
|
||||
to_date: date | None = None,
|
||||
) -> list[PlannedLeaveDay]:
|
||||
"""Return planned days for a workspace+child, optionally within a date range."""
|
||||
|
||||
@abstractmethod
|
||||
async def count_by_parent_type(
|
||||
self,
|
||||
personal_data_uuid: UUID,
|
||||
child_id: UUID,
|
||||
day_type: str,
|
||||
from_date: date | None = None,
|
||||
to_date: date | None = None,
|
||||
) -> int:
|
||||
"""Count planned days of a given type for a parent+child pair."""
|
||||
|
||||
@abstractmethod
|
||||
async def count_dubbeldagar(self, child_id: UUID, from_date: date | None = None) -> int:
|
||||
"""Count dubbeldagar already planned for a child (after from_date)."""
|
||||
Reference in New Issue
Block a user