15 lines
357 B
Python
15 lines
357 B
Python
from src.infra.db import CRUD
|
|
import abc
|
|
from src.config.email import EmailAddress
|
|
|
|
from .data import User, UserDTO
|
|
|
|
|
|
class UserRepo(CRUD[User, UserDTO]):
|
|
@abc.abstractmethod
|
|
def get_user_by_email(self, email: EmailAddress) -> User | None:
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def auth_as_user(self, user: UserDTO) -> User | None:
|
|
pass
|