rogerxavier commited on
Commit
0fb576b
1 Parent(s): cd2defa

Update server/pydanticModel.py

Browse files
Files changed (1) hide show
  1. server/pydanticModel.py +17 -21
server/pydanticModel.py CHANGED
@@ -54,10 +54,10 @@ class signIn(BaseModel):
54
 
55
 
56
  class SKUDetail(BaseModel):
57
- sku_id: str
58
- price: str
59
- count: int
60
- name: str
61
  album_id: Optional[str] = None
62
  pic: Optional[str] = None
63
  stock: Optional[str] = None
@@ -65,29 +65,25 @@ class SKUDetail(BaseModel):
65
 
66
 
67
  class AfdianOrderDetail(BaseModel):
68
- out_trade_no: str
69
- user_id: str
70
- plan_id: str
71
  title: Optional[str] = Field(default=None, alias="title") #just afdian test have
72
- month: int
73
  total_amount: Optional[int] = Field(default=None, alias="total_amount") # 这里自动转int了
74
- show_amount: str
75
- status: int
76
- remark: str
77
- redeem_id: str
78
- product_type: int
79
- discount: str
80
- # sku_detail: List[SKUDetail] # 更新为 SKUDetail 列表
81
  sku_detail: Optional[List[SKUDetail]] = Field(default=[], alias="sku_detail") #兼容afdian test 请求
82
- # create_time: int
83
  create_time: Optional[int] = Field(default=None, alias="create_time")
84
- # plan_title: str
85
  plan_title: Optional[str] = Field(default=None, alias="plan_title")
86
- # user_private_id: str
87
  user_private_id: Optional[str] = Field(default=None, alias="user_private_id")
88
- address_person: str
89
- address_phone: str
90
- address_address: str
91
  custom_order_id: Optional[str] = Field(default=None, alias="custom_order_id")
92
 
93
 
 
54
 
55
 
56
  class SKUDetail(BaseModel):
57
+ sku_id: Optional[str] = None
58
+ price: Optional[str] = None
59
+ count: Optional[int] = None
60
+ name: Optional[str] = None
61
  album_id: Optional[str] = None
62
  pic: Optional[str] = None
63
  stock: Optional[str] = None
 
65
 
66
 
67
  class AfdianOrderDetail(BaseModel):
68
+ out_trade_no: Optional[str] = Field(default=None, alias="out_trade_no")
69
+ user_id: Optional[str] = Field(default=None, alias="user_id")
70
+ plan_id: Optional[str] = Field(default=None, alias="plan_id")
71
  title: Optional[str] = Field(default=None, alias="title") #just afdian test have
72
+ month: Optional[int] = Field(default=None, alias="month")
73
  total_amount: Optional[int] = Field(default=None, alias="total_amount") # 这里自动转int了
74
+ show_amount: Optional[str] = Field(default=None, alias="show_amount")
75
+ status: Optional[int] = Field(default=None, alias="status")
76
+ remark: Optional[str] = Field(default=None, alias="remark")
77
+ redeem_id: Optional[str] = Field(default=None, alias="redeem_id")
78
+ product_type: Optional[int] = Field(default=None, alias="product_type")
79
+ discount: Optional[str] = Field(default=None, alias="discount")
 
80
  sku_detail: Optional[List[SKUDetail]] = Field(default=[], alias="sku_detail") #兼容afdian test 请求
 
81
  create_time: Optional[int] = Field(default=None, alias="create_time")
 
82
  plan_title: Optional[str] = Field(default=None, alias="plan_title")
 
83
  user_private_id: Optional[str] = Field(default=None, alias="user_private_id")
84
+ address_person: Optional[str] = Field(default=None, alias="address_person")
85
+ address_phone: Optional[str] = Field(default=None, alias="address_phone")
86
+ address_address: Optional[str] = Field(default=None, alias="address_address")
87
  custom_order_id: Optional[str] = Field(default=None, alias="custom_order_id")
88
 
89