service_man/api/domain/user/repository.py

15 lines
370 B
Python

from typing import Protocol
from api.domain.user.model import User
class UserRepository(Protocol):
async def get_user(self, filter: dict) -> User | None:
raise NotImplementedError
async def create_user(self, user: User) -> None:
raise NotImplementedError
async def get_users(self) -> list[User] | None:
raise NotImplementedError