create interface uow update services to uow

This commit is contained in:
IluaAir
2025-07-11 21:48:42 +03:00
parent 61512f70d4
commit b12bb65268
5 changed files with 20 additions and 8 deletions

16
src/core/interfaces.py Normal file
View File

@@ -0,0 +1,16 @@
from typing import Protocol
from src.repository.users import UsersRepo
class IUnitOfWork(Protocol):
user: UsersRepo
async def __aenter__(self) -> "IUnitOfWork":
...
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
...
async def commit(self) -> None:
...