Files
F-r-ldraledigplannerare/backend/app/repositories/user_repository.py
T
jacobh2 0e9b20ec37 Track preschool planning days, partner invites and real vacation forfeiture
Three strands of work that grew together across the same settings screen and
API client, so they land as one change.

Per-year preschool planning days ("studiedagar"): new table, repository
(SQLite + Postgres), service, router and migration 007, plus the hooks and
Settings UI to plan and record them per child and year. Allocation now
reserves the recorded figure for a year where one exists and only falls back
to the child-level estimate otherwise, marking that fallback as assumed.

Partner invitations: workspaces issue and list invitations, registration
accepts an invite token to join the inviter's workspace instead of creating a
personal one, and a /join/:token page plus the settings invite panel drive it.

Vacation forfeiture: tips and the dashboard now distinguish days a parent
genuinely loses from days that merely age, so the warning stops firing on
balances that were never at risk.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 11:22:07 +02:00

21 lines
669 B
Python

"""Abstract repository for User (login accounts)."""
from abc import abstractmethod
from uuid import UUID
from app.entities.user import User
from app.repositories.base import Repository
class UserRepository(Repository[User]):
@abstractmethod
async def get_by_email(self, email: str) -> User | None:
"""Return the user with this email, or None if not found."""
@abstractmethod
async def get_by_personal_data_uuid(self, personal_data_uuid: UUID) -> User | None:
"""Return the user linked to this personal_data row, or None if it has no login.
`personal_data_uuid` is UNIQUE on `user`, so this is at most one row.
"""