feat: add DealRepository with CRUD operations and update dependencies

This commit is contained in:
Artem Kashaev
2025-11-27 15:19:42 +05:00
parent c972d79ba9
commit 4b45073bd3
2 changed files with 157 additions and 0 deletions
+5
View File
@@ -10,6 +10,7 @@ from app.core.config import settings
from app.core.database import get_session
from app.core.security import jwt_service, password_hasher
from app.models.user import User
from app.repositories.deal_repo import DealRepository
from app.repositories.org_repo import OrganizationRepository
from app.repositories.user_repo import UserRepository
from app.services.auth_service import AuthService
@@ -32,6 +33,10 @@ def get_organization_repository(session: AsyncSession = Depends(get_db_session))
return OrganizationRepository(session=session)
def get_deal_repository(session: AsyncSession = Depends(get_db_session)) -> DealRepository:
return DealRepository(session=session)
def get_user_service(repo: UserRepository = Depends(get_user_repository)) -> UserService:
return UserService(user_repository=repo, password_hasher=password_hasher)