fix(billing): make quota seed and column names match the product SSOT
The product plan is the only source for quota numbers, but the 0001 seed used a second set (agent_chat 20/50, tryon hard 10) and omitted hairstyle, hd_export and report regen. Migration 0003 replaces the seed and renames points_reserved → quota_reserved and bonus_value → bonus_granted so the docs and the schema stop contradicting each other. Effective limit now clips at hard_cap. CI runs the integration slice against the Postgres/Redis services it already starts.
This commit is contained in:
@@ -29,7 +29,7 @@ async def get_quota(
|
||||
period_key=snapshot.period_key,
|
||||
used=snapshot.used,
|
||||
limit_value=snapshot.limit_value,
|
||||
bonus_value=snapshot.bonus_value,
|
||||
bonus_granted=snapshot.bonus_granted,
|
||||
remaining=snapshot.remaining,
|
||||
reset_at=snapshot.reset_at,
|
||||
).model_dump()
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ class QuotaResponse(BaseModel):
|
||||
period_key: str
|
||||
used: int
|
||||
limit_value: int
|
||||
bonus_value: int
|
||||
bonus_granted: int
|
||||
remaining: int
|
||||
reset_at: datetime | None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user