Files
F-r-ldraledigplannerare/backend/app/repositories/parental_leave_repository.py
T
2026-06-01 16:48:21 +02:00

22 lines
725 B
Python

"""Abstract repository for ParentalLeaveFetch snapshots."""
from abc import abstractmethod
from uuid import UUID
from app.entities.parental_leave import ParentalLeaveFetch
from app.repositories.base import Repository
class ParentalLeaveRepository(Repository[ParentalLeaveFetch]):
@abstractmethod
async def get_latest_by_parent(
self, personal_data_uuid: UUID, child_id: UUID
) -> ParentalLeaveFetch | None:
"""Return the most recently fetched snapshot for a parent+child pair."""
@abstractmethod
async def list_history(
self, personal_data_uuid: UUID, child_id: UUID
) -> list[ParentalLeaveFetch]:
"""Return all snapshots for a parent+child pair, newest first."""