Files
svg-backend/backend/app/schemas/pricing_diagnostics.py
greebo 8d4255181b feat(backend): add publish readiness contract and pricing diagnostics
add backend readiness contract for publish prechecks

add pricing diagnostics to explain publish-blocking conditions
make publish decisions more explicit and easier to debug for clients
2026-03-19 20:29:58 +03:00

53 lines
1.1 KiB
Python

from pydantic import BaseModel
class PricingCoverageResponse(BaseModel):
scheme_id: str
scheme_version_id: str
total_seats: int
priced_seats: int
unpriced_seats: int
coverage_percent: float
class UnpricedSeatItem(BaseModel):
seat_record_id: str
seat_id: str | None
element_id: str | None
sector_id: str | None
group_id: str | None
row_label: str | None
seat_number: str | None
reason_code: str
reason_message: str
class UnpricedSeatListResponse(BaseModel):
scheme_id: str
scheme_version_id: str
total: int
items: list[UnpricedSeatItem]
class ExplainMatchedRule(BaseModel):
matched_rule_level: str
matched_target_ref: str
pricing_category_id: str
amount: str
currency: str
class ExplainSeatPriceResponse(BaseModel):
scheme_id: str
scheme_version_id: str
seat_id: str
element_id: str | None
sector_id: str | None
group_id: str | None
row_label: str | None
seat_number: str | None
has_price: bool
reason_code: str
reason_message: str
matched_rule: ExplainMatchedRule | None