"""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. """