TorbatYar/backend/services/delivery/app/queries/settlement.py
Mortezakoohjani 72077908f1 feat(delivery): deploy backend phases 10.2-10.8 through settlement
Ship fleet, availability, pricing, dispatch, routing, tracking, and settlement on delivery-service 0.10.8.0 with migrations and phase tests green.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 21:01:23 +03:30

33 lines
967 B
Python

"""Settlement query handlers — Phase 10.8."""
from __future__ import annotations
from uuid import UUID
from sqlalchemy.ext.asyncio import AsyncSession
from app.services.settlement import SettlementService
from app.specifications.settlement import SettlementIntentListSpec
class SettlementQueries:
def __init__(self, session: AsyncSession) -> None:
self.service = SettlementService(session)
async def get(self, tenant_id: UUID, intent_id: UUID):
return await self.service.get(tenant_id, intent_id)
async def list(
self,
tenant_id: UUID,
*,
offset: int,
limit: int,
spec: SettlementIntentListSpec | None,
):
return await self.service.list(
tenant_id, offset=offset, limit=limit, spec=spec
)
async def lines(self, tenant_id: UUID, intent_id: UUID):
return await self.service.list_lines(tenant_id, intent_id)