Coverage for fastid / auth / repositories.py: 100%
7 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-10-18 16:37 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-10-18 16:37 +0000
1from typing import Any
3from fastid.auth.models import User
4from fastid.database.repository import SQLAlchemyRepository
5from fastid.database.specification import Specification
8class UserRepository(SQLAlchemyRepository[User]):
9 model_type = User
12class EmailUserSpecification(Specification):
13 def __init__(self, email: str) -> None:
14 self.email = email
16 def apply(self, stmt: Any) -> Any:
17 return stmt.where(User.email == self.email, User.is_active.is_(True))