支持其他店铺
This commit is contained in:
@@ -40,6 +40,8 @@ class DetailRequest(BaseModel):
|
||||
"""商品详情请求参数,支持 id 或 product_url"""
|
||||
id: str | None = Field(default=None, min_length=3, max_length=40)
|
||||
product_url: HttpUrl | None = None
|
||||
tenpo_cd: str | None = None # 指定店铺代码;跳转查看某个加盟店/市场店铺的报价时传入
|
||||
branch_number: str | None = None # 指定分支编号,与 tenpo_cd 搭配使用
|
||||
|
||||
|
||||
class ProductSummary(BaseModel):
|
||||
@@ -67,6 +69,24 @@ class SearchResultData(BaseModel):
|
||||
items: list[ProductSummary]
|
||||
|
||||
|
||||
class OtherShopItem(BaseModel):
|
||||
"""商品「他のショップ」列表中的单个店铺报价
|
||||
|
||||
来自 /product/other/{goods_id} 页面,含官方自营与加盟店/市场店铺。
|
||||
"""
|
||||
tenpo_cd: str = "" # 店铺代码;空串 = 官方自营
|
||||
shop_name: str = "" # 店铺名称;官方自营固定为"駿河屋"
|
||||
shop_url: str = "" # 店铺主页链接
|
||||
is_official: bool = False # 是否为官方自营(tenpo_cd 为空)
|
||||
condition: str = "" # 成色/规格描述,如"中古"
|
||||
price: int = 0 # 该店铺售价(日元)
|
||||
branch_number: str = "" # 分支编号
|
||||
rating_score: str = "" # 店铺评分,如"5.0"
|
||||
rating_count: int = 0 # 评价数量
|
||||
shipping_note: str = "" # 发货时效描述,如"1日〜3日以内に発送します"
|
||||
detail_url: str = "" # 该报价对应的商品详情页链接(含 tenpo_cd/branch_number)
|
||||
|
||||
|
||||
class ProductDetailData(BaseModel):
|
||||
"""商品详情数据"""
|
||||
goods_id: str
|
||||
@@ -86,6 +106,12 @@ class ProductDetailData(BaseModel):
|
||||
breadcrumb_list: list[dict[str, Any]] = [] # 面包屑
|
||||
|
||||
|
||||
class OtherShopListData(BaseModel):
|
||||
"""商品「他のショップ」全部店铺(含官方自营+加盟店/市场店铺)报价列表"""
|
||||
goods_id: str
|
||||
other_shop_list: list[OtherShopItem] = []
|
||||
|
||||
|
||||
class HealthData(BaseModel):
|
||||
"""健康检查响应数据"""
|
||||
status: str
|
||||
|
||||
Reference in New Issue
Block a user