create interface uow update services to uow
This commit is contained in:
16
src/core/interfaces.py
Normal file
16
src/core/interfaces.py
Normal 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:
|
||||
...
|
||||
Reference in New Issue
Block a user