This commit is contained in:
e4www
2026-01-30 16:34:56 +03:00
commit 12f2ceaf9b
27 changed files with 1331 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
from __future__ import annotations
from typing import Protocol, runtime_checkable
from app.application.users.ports.user_repository import UserRepository
@runtime_checkable
class UnitOfWork(Protocol):
users: UserRepository
async def __aenter__(self) -> "UnitOfWork": ...
async def __aexit__(self, exc_type, exc, tb) -> None: ...
async def commit(self) -> None: ...
async def rollback(self) -> None: ...