766666601e
Co-authored-by: OuYingJun1024 <1034284404@qq.com> Reviewed-on: #22 Reviewed-by: marco <marco@wonderable.ai> Co-authored-by: ouzhou <ouzhou@wonderable.ai> Co-committed-by: ouzhou <ouzhou@wonderable.ai>
25 lines
725 B
Python
25 lines
725 B
Python
"""首页平台级展示数据 schemas(客户端首页门面数字)。"""
|
|
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class PlatformStatsOut(BaseModel):
|
|
"""首页三统计。total_saved 为分,客户端 ÷100 显示「元」。"""
|
|
|
|
help_users: int # 帮助用户(人)
|
|
total_compares: int # 完成比价(次)
|
|
total_saved_cents: int # 累计节省(分)
|
|
|
|
|
|
class SavingsFeedItem(BaseModel):
|
|
"""首页轮播一条。time 为北京时间 HH:MM:SS。"""
|
|
|
|
masked_user: str # 脱敏用户名,如「用户********a52」
|
|
saved_amount_cents: int # 节省(分),客户端 ÷100 显示「x.xx 元」
|
|
time: str
|
|
|
|
|
|
class SavingsFeedOut(BaseModel):
|
|
items: list[SavingsFeedItem]
|