feat(backend): add sellability reason codes and string price serialization to test seat preview

extend test seat preview with explicit sellability reason codes

serialize preview price amount as string for a stable API contract
improve diagnosis of non-sellable states for preview consumers
This commit is contained in:
greebo
2026-03-19 20:07:19 +03:00
parent af175d88dd
commit aab5a51654
4 changed files with 43 additions and 14 deletions

View File

@@ -1,12 +1,10 @@
from decimal import Decimal
from pydantic import BaseModel
class TestSeatPreviewResponse(BaseModel):
scheme_id: str
scheme_version_id: str
seat_id: str
seat_id: str | None
element_id: str | None
sector_id: str | None
group_id: str | None
@@ -17,5 +15,7 @@ class TestSeatPreviewResponse(BaseModel):
matched_rule_level: str | None
matched_target_ref: str | None
pricing_category_id: str | None
amount: Decimal | None
amount: str | None
currency: str | None
reason_code: str
reason_message: str