This commit is contained in:
2026-03-17 20:12:29 +03:00
parent e796a5bfdd
commit d05f9c3042
14 changed files with 188 additions and 525 deletions
-20
View File
@@ -8,9 +8,6 @@ from dutylog.infrastructure.database.dao.users_dao import UsersDAO
from dutylog.infrastructure.database.dao.hours_transactions_dao import (
HoursTransactionsDAO,
)
from dutylog.infrastructure.database.dao.room_hours_transactions_dao import (
RoomHoursTransactionsDAO,
)
from dutylog.infrastructure.database.dao.rooms_dao import RoomsDAO
from dutylog.infrastructure.database.dao.residents_dao import ResidentsDAO
from dutylog.infrastructure.database.dao.floors_dao import FloorsDAO
@@ -23,9 +20,6 @@ from dutylog.infrastructure.database.repositories.users_repository import (
from dutylog.infrastructure.database.repositories.hours_transactions_repository import (
HoursTransactionsRepository,
)
from dutylog.infrastructure.database.repositories.room_hours_transactions_repository import (
RoomHoursTransactionsRepository,
)
from dutylog.infrastructure.database.repositories.rooms_repository import (
RoomsRepository,
)
@@ -76,10 +70,6 @@ class DAOProvider(Provider):
def get_hours_transactions_dao(self, session: AsyncSession) -> HoursTransactionsDAO:
return HoursTransactionsDAO(session)
@provide(scope=Scope.REQUEST)
def get_room_hours_transactions_dao(self, session: AsyncSession) -> RoomHoursTransactionsDAO:
return RoomHoursTransactionsDAO(session)
@provide(scope=Scope.REQUEST)
def get_rooms_dao(self, session: AsyncSession) -> RoomsDAO:
return RoomsDAO(session)
@@ -110,14 +100,6 @@ class RepositoryProvider(Provider):
) -> HoursTransactionsRepository:
return HoursTransactionsRepository(transactions_dao, residents_dao)
@provide(scope=Scope.REQUEST)
def get_room_hours_transactions_repository(
self,
transactions_dao: RoomHoursTransactionsDAO,
rooms_dao: RoomsDAO,
) -> RoomHoursTransactionsRepository:
return RoomHoursTransactionsRepository(transactions_dao, rooms_dao)
@provide(scope=Scope.REQUEST)
def get_rooms_repository(self, rooms_dao: RoomsDAO) -> RoomsRepository:
return RoomsRepository(rooms_dao)
@@ -144,7 +126,6 @@ class ServiceProvider(Provider):
def get_report_service(
self,
hours_transactions_repository: HoursTransactionsRepository,
room_hours_transactions_repository: RoomHoursTransactionsRepository,
residents_repository: ResidentsRepository,
rooms_repository: RoomsRepository,
floors_repository: FloorsRepository,
@@ -152,7 +133,6 @@ class ServiceProvider(Provider):
) -> ReportService:
return ReportService(
hours_transactions_repository,
room_hours_transactions_repository,
residents_repository,
rooms_repository,
floors_repository,