lingxingapi 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lingxingapi might be problematic. Click here for more details.

Files changed (65) hide show
  1. lingxingapi/__init__.py +7 -0
  2. lingxingapi/ads/__init__.py +0 -0
  3. lingxingapi/ads/api.py +5946 -0
  4. lingxingapi/ads/param.py +192 -0
  5. lingxingapi/ads/route.py +134 -0
  6. lingxingapi/ads/schema.py +2615 -0
  7. lingxingapi/api.py +443 -0
  8. lingxingapi/base/__init__.py +0 -0
  9. lingxingapi/base/api.py +409 -0
  10. lingxingapi/base/param.py +59 -0
  11. lingxingapi/base/route.py +11 -0
  12. lingxingapi/base/schema.py +198 -0
  13. lingxingapi/basic/__init__.py +0 -0
  14. lingxingapi/basic/api.py +466 -0
  15. lingxingapi/basic/param.py +72 -0
  16. lingxingapi/basic/route.py +20 -0
  17. lingxingapi/basic/schema.py +212 -0
  18. lingxingapi/errors.py +143 -0
  19. lingxingapi/fba/__init__.py +0 -0
  20. lingxingapi/fba/api.py +1691 -0
  21. lingxingapi/fba/param.py +250 -0
  22. lingxingapi/fba/route.py +30 -0
  23. lingxingapi/fba/schema.py +987 -0
  24. lingxingapi/fields.py +50 -0
  25. lingxingapi/finance/__init__.py +0 -0
  26. lingxingapi/finance/api.py +3091 -0
  27. lingxingapi/finance/param.py +616 -0
  28. lingxingapi/finance/route.py +44 -0
  29. lingxingapi/finance/schema.py +1243 -0
  30. lingxingapi/product/__init__.py +0 -0
  31. lingxingapi/product/api.py +2643 -0
  32. lingxingapi/product/param.py +934 -0
  33. lingxingapi/product/route.py +49 -0
  34. lingxingapi/product/schema.py +1004 -0
  35. lingxingapi/purchase/__init__.py +0 -0
  36. lingxingapi/purchase/api.py +496 -0
  37. lingxingapi/purchase/param.py +126 -0
  38. lingxingapi/purchase/route.py +11 -0
  39. lingxingapi/purchase/schema.py +215 -0
  40. lingxingapi/sales/__init__.py +0 -0
  41. lingxingapi/sales/api.py +3200 -0
  42. lingxingapi/sales/param.py +723 -0
  43. lingxingapi/sales/route.py +70 -0
  44. lingxingapi/sales/schema.py +1718 -0
  45. lingxingapi/source/__init__.py +0 -0
  46. lingxingapi/source/api.py +1799 -0
  47. lingxingapi/source/param.py +176 -0
  48. lingxingapi/source/route.py +38 -0
  49. lingxingapi/source/schema.py +1011 -0
  50. lingxingapi/tools/__init__.py +0 -0
  51. lingxingapi/tools/api.py +291 -0
  52. lingxingapi/tools/param.py +73 -0
  53. lingxingapi/tools/route.py +8 -0
  54. lingxingapi/tools/schema.py +169 -0
  55. lingxingapi/utils.py +411 -0
  56. lingxingapi/warehourse/__init__.py +0 -0
  57. lingxingapi/warehourse/api.py +1778 -0
  58. lingxingapi/warehourse/param.py +506 -0
  59. lingxingapi/warehourse/route.py +28 -0
  60. lingxingapi/warehourse/schema.py +926 -0
  61. lingxingapi-1.0.0.dist-info/METADATA +67 -0
  62. lingxingapi-1.0.0.dist-info/RECORD +65 -0
  63. lingxingapi-1.0.0.dist-info/WHEEL +5 -0
  64. lingxingapi-1.0.0.dist-info/licenses/LICENSE +22 -0
  65. lingxingapi-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1004 @@
1
+ # -*- coding: utf-8 -*-
2
+ from pydantic import BaseModel, Field
3
+ from lingxingapi.base import schema as base_schema
4
+ from lingxingapi.base.schema import ResponseV1, ResponseResult, FlattenDataList
5
+ from lingxingapi.fields import IntOrNone2Zero, FloatOrNone2Zero, StrOrNone2Blank
6
+
7
+
8
+ # 产品 --------------------------------------------------------------------------------------------------------------------------
9
+ # . Products
10
+ class ProductQuotePriceTier(BaseModel):
11
+ """领星本地产品供应商报价定价梯度"""
12
+
13
+ # 最小订购量 (MOQ)
14
+ moq: int
15
+ # 报价 (不含税) [原字段 'price']
16
+ price_excl_tax: float = Field(validation_alias="price")
17
+ # 报价 (含税)
18
+ price_with_tax: float
19
+
20
+
21
+ class ProductQuotePricing(BaseModel):
22
+ """领星本地产品供应商报价定价信息"""
23
+
24
+ # 报价货币代码 [原字段 'currency']
25
+ currency_code: str = Field(validation_alias="currency")
26
+ # 报价货币符号
27
+ currency_icon: str
28
+ # 报价是否含税 (0: 否, 1: 是) [原字段 'is_tax']
29
+ is_tax_inclusive: int = Field(validation_alias="is_tax")
30
+ # 报价税率 (百分比)
31
+ tax_rate: float
32
+ # 报价梯度 [原字段 'step_prices']
33
+ price_tiers: list[ProductQuotePriceTier] = Field(validation_alias="step_prices")
34
+
35
+
36
+ class ProductSupplierQuote(BaseModel):
37
+ """领星本地产品供应商报价信息"""
38
+
39
+ # 领星本地产品ID
40
+ product_id: int
41
+ # 供应商ID
42
+ supplier_id: int
43
+ # 供应商名称
44
+ supplier_name: str
45
+ # 供应商编码
46
+ supplier_code: str
47
+ # 供应商等级 [原字段 'level_text']
48
+ supplier_level: str = Field("", validation_alias="level_text")
49
+ # 供应商员工数 [原字段 'employees_text']
50
+ supplier_employees: str = Field("", validation_alias="employees_text")
51
+ # 供应商产品链接 [原字段 'supplier_product_url']
52
+ supplier_product_urls: list[str] = Field(validation_alias="supplier_product_url")
53
+ # 供应商备注 [原字段 'remark']
54
+ supplier_note: str = Field("", validation_alias="remark")
55
+ # 是否是首选供应商 (0: 否, 1: 是) [原字段 'is_primary']
56
+ is_primary_supplier: int = Field(validation_alias="is_primary")
57
+ # 报价ID [原字段 'psq_id']
58
+ quote_id: int = Field(validation_alias="psq_id")
59
+ # 报价货币符号 [原字段 'cg_currency_icon']
60
+ quote_currency_icon: str = Field(validation_alias="cg_currency_icon")
61
+ # 报价单价 [原字段 'cg_price']
62
+ quote_price: float = Field(validation_alias="cg_price")
63
+ # 报价交期 (单位: 天) [原字段 'quote_cg_delivery']
64
+ quote_delivery_time: int = Field(validation_alias="quote_cg_delivery")
65
+ # 报价备注 [原字段 'quote_remark']
66
+ quote_note: str = Field(validation_alias="quote_remark")
67
+ # 报价列表 [原字段 'quotes']
68
+ quotes: list[ProductQuotePricing]
69
+
70
+
71
+ class Product(BaseModel):
72
+ """领星本地产品"""
73
+
74
+ # fmt: off
75
+ # 领星本地SKU [原字段 'sku']
76
+ lsku: str = Field(validation_alias="sku")
77
+ # 领星本地SKU识别码
78
+ sku_identifier: str
79
+ # 领星本地产品ID [原字段 'id']
80
+ product_id: int = Field(validation_alias="id")
81
+ # 领星本地产品名称
82
+ product_name: str
83
+ # 领星本地产品分类ID [原字段 'cid']
84
+ category_id: int = Field(validation_alias="cid")
85
+ # 领星本地产品分类名称
86
+ category_name: str
87
+ # 领星本地产品品牌ID
88
+ brand_id: int = Field(validation_alias="bid")
89
+ # 领星本地产品品牌名称
90
+ brand_name: str
91
+ # 产品图片链接 [原字段 'pic_url']
92
+ image_url: str = Field(validation_alias="pic_url")
93
+ # 是否为组合产品 (0: 否, 1: 是) [原字段 'is_combo']
94
+ is_bundled: int = Field(validation_alias="is_combo")
95
+ # 产品是否被启用 (0: 未启用, 1: 已启用) [原字段 'open_status']
96
+ is_enabled: int = Field(validation_alias="open_status")
97
+ # 产品状态 (0: 停售, 1: 在售, 2: 开发中, 3: 清仓) [原字段 'status']
98
+ status: int
99
+ # 产品状态描述 [原字段 'status_text']
100
+ status_desc: str = Field(validation_alias="status_text")
101
+ # 创建时间 (北京之间, 时间戳) [原字段 'create_time']
102
+ create_time_ts: int = Field(validation_alias="create_time")
103
+ # 更新时间 (北京时间, 时间戳) [原字段 'update_time']
104
+ update_time_ts: int = Field(validation_alias="update_time")
105
+ # 产品开发者用户ID (Account.user_id) [原字段 'product_developer_uid']
106
+ product_developer_id: int = Field(validation_alias="product_developer_uid")
107
+ # 产品开发者姓名 (Account.display_name) [原字段 'product_developer']
108
+ product_developer_name: str = Field(validation_alias="product_developer")
109
+ # 产品采购人用户ID (Account.user_id) [原字段 'cg_opt_uid']
110
+ purchase_staff_id: int = Field(validation_alias="cg_opt_uid")
111
+ # 产品采购人姓名 (Account.display_name) [原字段 'cg_opt_username']
112
+ purchase_staff_name: str = Field(validation_alias="cg_opt_username")
113
+ # 采购交期 (单位: 天) [原字段 'cg_delivery']
114
+ purchase_delivery_time: int = Field(validation_alias="cg_delivery")
115
+ # 采购运输成本 [原字段 'cg_transport_costs']
116
+ purchase_transport_costs: float = Field(validation_alias="cg_transport_costs")
117
+ # 采购成本 [原字段 'cg_price']
118
+ purchase_price: float = Field(validation_alias="cg_price")
119
+ # 采购备注 [原字段 'purchase_remark']
120
+ purchase_note: str = Field(validation_alias="purchase_remark")
121
+ # 供应商报价信息列表 [原字段 'supplier_quote']
122
+ supplier_quotes: list[ProductSupplierQuote] = Field(validation_alias="supplier_quote")
123
+ # 多属性产品ID [原字段 'ps_id']
124
+ spu_id: int = Field(validation_alias="ps_id")
125
+ # 多属性产品名称 [原字段 'spu']
126
+ spu_name: str = Field(validation_alias="spu")
127
+ # 产品属性列表 [原字段 'attribute']
128
+ attributes: list[base_schema.SpuProductAttribute] = Field(validation_alias="attribute")
129
+ # 产品标签列表 [原字段 'global_tags']
130
+ tags: list[base_schema.TagInfo] = Field(validation_alias="global_tags")
131
+ # 自定义字段
132
+ custom_fields: list[base_schema.CustomField]
133
+ # fmt: on
134
+
135
+
136
+ class Products(ResponseV1):
137
+ """领星本地产品列表"""
138
+
139
+ data: list[Product]
140
+
141
+
142
+ # . Product Detail
143
+ class ProductBundleItem(BaseModel):
144
+ """领星本地产品组合信息"""
145
+
146
+ # 领星本地SKU [原字段 'sku']
147
+ lsku: str = Field(validation_alias="sku")
148
+ # 领星本地产品ID
149
+ product_id: int
150
+ # 产品数量 [原字段 'quantity']
151
+ product_qty: int = Field(validation_alias="quantity")
152
+
153
+
154
+ class ProductImage(BaseModel):
155
+ """领星本地产品图片信息"""
156
+
157
+ # 图片链接 [原字段 'pic_url']
158
+ image_url: str = Field(validation_alias="pic_url")
159
+ # 是否为主图 (0: 否, 1: 是)
160
+ is_primary: int
161
+
162
+
163
+ class ProductCustomsDeclaration(BaseModel):
164
+ """领星本地产品报关信息"""
165
+
166
+ # fmt: off
167
+ # 报关申报品名 (出口国) [原字段 'customs_export_name']
168
+ export_name: str = Field("", validation_alias="customs_export_name")
169
+ # 报关申报HS编码 (出口国) [原字段 'customs_declaration_hs_code']
170
+ export_hs_code: str = Field("", validation_alias="customs_declaration_hs_code")
171
+ # 报关申报品名 (进口国) [原字段 'customs_import_name']
172
+ import_name: str = Field("", validation_alias="customs_import_name")
173
+ # 报关申报单价 (进口国) [原字段 'customs_import_price']
174
+ import_price: float = Field(validation_alias="customs_import_price")
175
+ # 报关申报单价货币代码 (进口国) [原字段 'customs_import_price_currency']
176
+ currency_code: str = Field(validation_alias="customs_import_price_currency")
177
+ # 报关申报单价货币符号 (进口国) [原字段 'customs_import_price_currency_icon']
178
+ currency_icon: str = Field("", validation_alias="customs_import_price_currency_icon")
179
+ # 报关申报产品单位 [原字段 'customs_declaration_unit']
180
+ unit: str = Field(validation_alias="customs_declaration_unit")
181
+ # 报关申报产品规格 [原字段 'customs_declaration_spec']
182
+ specification: str = Field(validation_alias="customs_declaration_spec")
183
+ # 报关申报产品原产地 [原字段 'customs_declaration_origin_produce']
184
+ country_of_origin: str = Field(validation_alias="customs_declaration_origin_produce")
185
+ # 报关申报内陆来源 [原字段 'customs_declaration_inlands_source']
186
+ source_from_inland: str = Field(validation_alias="customs_declaration_inlands_source")
187
+ # 报关申报免税 [原字段 'customs_declaration_exempt']
188
+ exemption: str = Field(validation_alias="customs_declaration_exempt")
189
+ # 其他申报要素 [原字段 'other_declare_element']
190
+ other_details: str = Field("", validation_alias="other_declare_element")
191
+ # fmt: on
192
+
193
+
194
+ class ProductCustomsClearance(BaseModel):
195
+ """领星本地产品清关信息"""
196
+
197
+ # fmt: off
198
+ # 清关内部编码 [原字段 'customs_clearance_internal_code']
199
+ internal_code: str = Field(validation_alias="customs_clearance_internal_code")
200
+ # 清关产品材质 [原字段 'customs_clearance_material']
201
+ material: str = Field(validation_alias="customs_clearance_material")
202
+ # 清关产品用途 [原字段 'customs_clearance_usage']
203
+ usage: str = Field(validation_alias="customs_clearance_usage")
204
+ # 清关是否享受优惠 [原字段 'customs_clearance_preferential']
205
+ # (0: 未设置, 1: 不享惠, 2: 享惠, 3: 不确定)
206
+ preferential: int = Field(validation_alias="customs_clearance_preferential")
207
+ # 清关是否享受优惠描述 [原字段 'customs_clearance_preferential_text']
208
+ preferential_desc: str = Field("", validation_alias="customs_clearance_preferential_text")
209
+ # 清关品牌类型 [原字段 'customs_clearance_brand_type']
210
+ # (0: 未设置, 1: 无品牌, 2: 境内品牌[自主], 3: 境内品牌[收购], 4: 境外品牌[贴牌], 5: 境外品牌[其他])
211
+ brand_type: int = Field(validation_alias="customs_clearance_brand_type")
212
+ # 清关品牌类型描述 [原字段 'customs_clearance_brand_type_text']
213
+ brand_type_desc: str = Field("", validation_alias="customs_clearance_brand_type_text")
214
+ # 清关产品型号 [原字段 'customs_clearance_product_pattern']
215
+ model: str = Field(validation_alias="customs_clearance_product_pattern")
216
+ # 清关产品图片链接 [原字段 'customs_clearance_pic_url']
217
+ image_url: str = Field(validation_alias="customs_clearance_pic_url")
218
+ # 配货备注 [原字段 'allocation_remark']
219
+ allocation_note: StrOrNone2Blank = Field(validation_alias="allocation_remark")
220
+ # 织造类型 (0: 未设置, 1: 针织, 2: 梭织) [原字段 'weaving_mode']
221
+ fabric_type: int = Field(validation_alias="weaving_mode")
222
+ # 织造类型描述 [原字段 'weaving_mode_text']
223
+ fabric_type_desc: str = Field("", validation_alias="weaving_mode_text")
224
+ # 清关申报单价货币代码 [原字段 'customs_clearance_price_currency']
225
+ clearance_currency_code: str = Field(validation_alias="customs_clearance_price_currency")
226
+ # 清关申报单价货币符号 [原字段 'customs_clearance_price_currency_icon']
227
+ clearance_currency_icon: str = Field("", validation_alias="customs_clearance_price_currency_icon")
228
+ # 清关申报单价 [原字段 'customs_clearance_price']
229
+ clearance_price: float = Field(validation_alias="customs_clearance_price")
230
+ # 清关税率 [原字段 'customs_clearance_tax_rate']
231
+ clearance_tax_rate: float = Field(validation_alias="customs_clearance_tax_rate")
232
+ # 清关HS编码 [原字段 'customs_clearance_hs_code']
233
+ clearance_hs_code: str = Field(validation_alias="customs_clearance_hs_code")
234
+ # 清关备注 [原字段 'customs_clearance_remark']
235
+ clearance_note: StrOrNone2Blank = Field(validation_alias="customs_clearance_remark")
236
+ # fmt: on
237
+
238
+
239
+ class ProductOperator(BaseModel):
240
+ """领星本地产品负责人信息"""
241
+
242
+ # 负责人帐号ID (Account.user_id) [原字段 'permission_uid']
243
+ user_id: int = Field(validation_alias="permission_uid")
244
+ # 负责人姓名 (Account.display_name) [原字段 'permission_user_name']
245
+ user_name: str = Field(validation_alias="permission_user_name")
246
+
247
+
248
+ class ProductDetail(BaseModel):
249
+ """领星本地产品详情"""
250
+
251
+ # fmt: off
252
+ # 领星本地SKU [原字段 'sku']
253
+ lsku: str = Field(validation_alias="sku")
254
+ # 领星本地SKU识别码
255
+ sku_identifier: str
256
+ # 领星本地产品ID [原字段 'id']
257
+ product_id: int = Field(validation_alias="id")
258
+ # 领星本地产品名称
259
+ product_name: str
260
+ # 领星本地产品分类ID [原字段 'cid']
261
+ category_id: int = Field(validation_alias="cid")
262
+ # 领星本地产品分类名称
263
+ category_name: str
264
+ # 领星本地产品品牌ID
265
+ brand_id: int = Field(validation_alias="bid")
266
+ # 领星本地产品品牌名称
267
+ brand_name: str
268
+ # 产品图片链接 [原字段 'pic_url']
269
+ image_url: str = Field(validation_alias="pic_url")
270
+ # 是否为组合产品 (0: 否, 1: 是) [原字段 'is_combo']
271
+ is_bundled: int = Field(validation_alias="is_combo")
272
+ # 组合产品所包含的单品列表 [原字段 'combo_product_list']
273
+ bundle_items: list[ProductBundleItem] = Field(validation_alias="combo_product_list")
274
+ # 产品状态 (0: 停售, 1: 在售, 2: 开发中, 3: 清仓) [原字段 'status']
275
+ status: int
276
+ # 产品型号 [原字段 'model']
277
+ product_model: str = Field(validation_alias="model")
278
+ # 产品单位 [原字段 'unit']
279
+ product_unit: str = Field(validation_alias="unit")
280
+ # 产品描述 [原字段 'description']
281
+ product_description: str = Field(validation_alias="description")
282
+ # 产品图片列表 [原字段 'picture_list']
283
+ product_images: list[ProductImage] = Field(validation_alias="picture_list")
284
+ # 产品特殊属性列表 (1: 含电, 2: 纯电, 3: 液体, 4: 粉末, 5: 膏体, 6: 带磁) [原字段 'special_attr']
285
+ product_special_attrs: list[int] = Field(validation_alias="special_attr")
286
+ # 产品开发者用户ID (Account.user_id) [原字段 'product_developer_uid']
287
+ product_developer_id: int = Field(validation_alias="product_developer_uid")
288
+ # 产品开发者姓名 (Account.display_name) [原字段 'product_developer']
289
+ product_developer_name: str = Field(validation_alias="product_developer")
290
+ # 产品采购人姓名 (Account.display_name) [原字段 'cg_opt_username']
291
+ purchase_staff_name: str = Field(validation_alias="cg_opt_username")
292
+ # 采购交期 (单位: 天) [原字段 'cg_delivery']
293
+ purchase_delivery_time: int = Field(validation_alias="cg_delivery")
294
+ # 采购价格货币代码 [原字段 'currency']
295
+ purchase_currency_code: str = Field(validation_alias="currency")
296
+ # 采购价格 [原字段 'cg_price']
297
+ purchase_price: float = Field(validation_alias="cg_price")
298
+ # 采购备注 [原字段 'purchase_remark']
299
+ purchase_note: str = Field(validation_alias="purchase_remark")
300
+ # 采购产品材质 [原字段 'cg_product_material']
301
+ product_material: str = Field(validation_alias="cg_product_material")
302
+ # 采购产品总重 (单位: G) [原字段 'cg_product_gross_weight']
303
+ product_gross_weight: FloatOrNone2Zero = Field(validation_alias="cg_product_gross_weight")
304
+ # 采购产品净重 (单位: G) [原字段 'cg_product_net_weight']
305
+ product_net_weight: FloatOrNone2Zero = Field(validation_alias="cg_product_net_weight")
306
+ # 采购产品长度 (单位: CM) [原字段 'cg_product_length']
307
+ product_length: FloatOrNone2Zero = Field(validation_alias="cg_product_length")
308
+ # 采购产品宽度 (单位: CM) [原字段 'cg_product_width']
309
+ product_width: FloatOrNone2Zero = Field(validation_alias="cg_product_width")
310
+ # 采购产品高度 (单位: CM) [原字段 'cg_product_height']
311
+ product_height: FloatOrNone2Zero = Field(validation_alias="cg_product_height")
312
+ # 采购包装长度 (单位: CM) [原字段 'cg_package_length']
313
+ package_length: FloatOrNone2Zero = Field(validation_alias="cg_package_length")
314
+ # 采购包装宽度 (单位: CM) [原字段 'cg_package_width']
315
+ package_width: FloatOrNone2Zero = Field(validation_alias="cg_package_width")
316
+ # 采购包装高度 (单位: CM) [原字段 'cg_package_height']
317
+ package_height: FloatOrNone2Zero = Field(validation_alias="cg_package_height")
318
+ # 采购外箱重量 (单位: KG) [原字段 'cg_box_weight']
319
+ box_weight: FloatOrNone2Zero = Field(validation_alias="cg_box_weight")
320
+ # 采购外箱长度 (单位: CM) [原字段 'cg_box_length']
321
+ box_length: FloatOrNone2Zero = Field(validation_alias="cg_box_length")
322
+ # 采购外箱宽度 (单位: CM) [原字段 'cg_box_width']
323
+ box_width : FloatOrNone2Zero = Field(validation_alias="cg_box_width")
324
+ # 采购外箱高度 (单位: CM) [原字段 'cg_box_height']
325
+ box_height: FloatOrNone2Zero = Field(validation_alias="cg_box_height")
326
+ # 采购外箱数量 [原字段 'cg_box_pcs']
327
+ box_qty: IntOrNone2Zero = Field(validation_alias="cg_box_pcs")
328
+ # 供应商报价信息列表 [原字段 'supplier_quote']
329
+ supplier_quotes: list[ProductSupplierQuote] = Field(validation_alias="supplier_quote")
330
+ # 报关申报品名 (出口国) [原字段 'bg_customs_export_name']
331
+ customs_export_name: str = Field(validation_alias="bg_customs_export_name")
332
+ # 报关申报HS编码 (出口国) [原字段 'bg_export_hs_code']
333
+ customs_export_hs_code: str = Field(validation_alias="bg_export_hs_code")
334
+ # 报关申报品名 (进口国) [原字段 'bg_customs_import_name']
335
+ customs_import_name: str = Field(validation_alias="bg_customs_import_name")
336
+ # 报关申报单价 (进口国) [原字段 'bg_customs_import_price']
337
+ customs_import_price: FloatOrNone2Zero = Field(validation_alias="bg_customs_import_price")
338
+ # 报关申报HS编码 (进口国) [原字段 'bg_import_hs_code']
339
+ customs_import_hs_code: str = Field(validation_alias="bg_import_hs_code")
340
+ # 报关信息 [原字段 'declaration']
341
+ customs_declaration: ProductCustomsDeclaration = Field(validation_alias="declaration")
342
+ # 清关信息 [原字段 'clearance']
343
+ customs_clearance: ProductCustomsClearance = Field(validation_alias="clearance")
344
+ # 负责人列表 [原字段 'permission_user_info']
345
+ operators: list[ProductOperator] = Field(validation_alias="permission_user_info")
346
+ # 产品标签列表 [原字段 'global_tags']
347
+ tags: list[base_schema.TagInfo] = Field(validation_alias="global_tags")
348
+ # 产品附件ID [原字段 'attachment_id']
349
+ attachment_ids: list[str] = Field(validation_alias="attachment_id")
350
+ # 自定义字段
351
+ custom_fields: list[base_schema.CustomField]
352
+
353
+
354
+ class ProductDetails(ResponseV1):
355
+ """领星本地产品详情列表"""
356
+
357
+ data: list[ProductDetail]
358
+
359
+
360
+ # . Edit Product
361
+ class EditProduct(BaseModel):
362
+ """领星本地产品编辑结果"""
363
+
364
+ # 领星本地产品SKU [原字段 'sku']
365
+ lsku: str = Field(validation_alias="sku")
366
+ # 领星本地SKU识别码
367
+ sku_identifier: str
368
+ # 领星本地产品ID
369
+ product_id: int
370
+
371
+
372
+ class EditProductResult(ResponseResult):
373
+ """领星本地产品编辑结果"""
374
+
375
+ data: EditProduct
376
+
377
+
378
+ # . SPU Products
379
+ class SpuProduct(BaseModel):
380
+ """领星本地SPU多属性产品"""
381
+
382
+ # 领星SPU多属性产品ID [原字段 'ps_id']
383
+ spu_id: int = Field(validation_alias="ps_id")
384
+ # 领星SPU多属性产品编码
385
+ spu: str
386
+ # 领星SPU多属性产品名称
387
+ spu_name: str
388
+ # 领星本地产品分类ID [原字段 'cid']
389
+ category_id: int = Field(validation_alias="cid")
390
+ # 领星本地产品品牌ID [原字段 'bid']
391
+ brand_id: int = Field(validation_alias="bid")
392
+ # 产品型号 [原字段 'model']
393
+ product_model: str = Field(validation_alias="model")
394
+ # 产品开发者用户ID (Account.user_id) [原字段 'developer_uid']
395
+ product_developer_id: int = Field(validation_alias="developer_uid")
396
+ # 产品采购人用户ID (Account.user_id) [原字段 'cg_uid']
397
+ purchase_staff_id: int = Field(validation_alias="cg_uid")
398
+ # 采购交期 (单位: 天) [原字段 'cg_delivery']
399
+ purchase_delivery_time: int = Field(validation_alias="cg_delivery")
400
+ # 采购成本 [原字段 'cg_price']
401
+ purchase_price: float = Field(validation_alias="cg_price")
402
+ # 采购备注 [原字段 'purchase_remark']
403
+ purchase_note: str = Field(validation_alias="purchase_remark")
404
+ # 创建人用户ID (Account.user_id) [原字段 'create_uid']
405
+ create_user_id: int = Field(validation_alias="create_uid")
406
+ # 创建时间 (北京时间)
407
+ create_time: str
408
+ # 产品状态 (0: 停售, 1: 在售, 2: 开发中, 3: 清仓)
409
+ status: int
410
+
411
+
412
+ class SpuProducts(ResponseV1):
413
+ """领星本地SPU多属性产品列表"""
414
+
415
+ data: list[SpuProduct]
416
+
417
+
418
+ # . SPU Product Detail
419
+ class SpuProductOperator(BaseModel):
420
+ """领星SPU多属性产品负责人信息"""
421
+
422
+ # 负责人帐号ID (Account.user_id) [原字段 'permission_uid']
423
+ user_id: int = Field(validation_alias="id")
424
+ # 负责人姓名 (Account.display_name) [原字段 'permission_user_name']
425
+ user_name: str = Field(validation_alias="realname")
426
+
427
+
428
+ class SpuProductPurchaseInfo(BaseModel):
429
+ """领星SPU多属性产品采购信息"""
430
+
431
+ # fmt: off
432
+ # 产品采购人用户ID (Account.user_id) [原字段 'cg_uid']
433
+ purchase_staff_id: int = Field(validation_alias="cg_uid")
434
+ # 产品采购人姓名 (Account.display_name) [原字段 'cg_user']
435
+ purchase_staff_name: str = Field(validation_alias="cg_user")
436
+ # 采购交期 (单位: 天) [原字段 'cg_delivery']
437
+ purchase_delivery_time: int = Field(validation_alias="cg_delivery")
438
+ # 采购价格 [原字段 'cg_price']
439
+ purchase_price: float = Field(validation_alias="cg_price")
440
+ # 采购备注 [原字段 'purchase_remark']
441
+ purchase_note: str = Field(validation_alias="purchase_remark")
442
+ # 采购产品材质 [原字段 'cg_product_material']
443
+ product_material: str = Field(validation_alias="cg_product_material")
444
+ # 采购产品公制总重 [原字段 'cg_product_gross_weight']
445
+ product_gross_weight_metric: FloatOrNone2Zero = Field(validation_alias="cg_product_gross_weight")
446
+ # 采购产品公制总重单位 [原字段 'cg_product_gross_weight_unit']
447
+ product_gross_weight_metric_unit: str = Field(validation_alias="cg_product_gross_weight_unit")
448
+ # 采购产品英制总重 [原字段 'cg_product_gross_weight_in']
449
+ product_gross_weight_imperial: FloatOrNone2Zero = Field(validation_alias="cg_product_gross_weight_in")
450
+ # 采购产品总重英制单位 [原字段 'cg_product_gross_weight_in_unit']
451
+ product_gross_weight_imperial_unit: str = Field(validation_alias="cg_product_gross_weight_in_unit")
452
+ # 采购产品公制净重 [原字段 'cg_product_net_weight']
453
+ product_net_weight_metric: FloatOrNone2Zero = Field(validation_alias="cg_product_net_weight")
454
+ # 采购产品公制净重单位 [原字段 'cg_product_net_weight_unit']
455
+ product_net_weight_metric_unit: str = Field(validation_alias="cg_product_net_weight_unit")
456
+ # 采购产品英制净重 [原字段 'cg_product_net_weight_in']
457
+ product_net_weight_imperial: FloatOrNone2Zero = Field(validation_alias="cg_product_net_weight_in")
458
+ # 采购产品净重英制单位 [原字段 'cg_product_net_weight_in_unit']
459
+ product_net_weight_imperial_unit: str = Field(validation_alias="cg_product_net_weight_in_unit")
460
+ # 采购产品公制长度 [原字段 'cg_product_length']
461
+ product_length_metric: FloatOrNone2Zero = Field(validation_alias="cg_product_length")
462
+ # 采购产品英制长度 [原字段 'cg_product_length_in']
463
+ product_length_imperial: FloatOrNone2Zero = Field(validation_alias="cg_product_length_in")
464
+ # 采购产品公制宽度 [原字段 'cg_product_width']
465
+ product_width_metric: FloatOrNone2Zero = Field(validation_alias="cg_product_width")
466
+ # 采购产品英制宽度 [原字段 'cg_product_width_in']
467
+ product_width_imperial: FloatOrNone2Zero = Field(validation_alias="cg_product_width_in")
468
+ # 采购产品公制高度 [原字段 'cg_product_height']
469
+ product_height_metric: FloatOrNone2Zero = Field(validation_alias="cg_product_height")
470
+ # 采购产品英制高度 [原字段 'cg_product_height_in']
471
+ product_height_imperial: FloatOrNone2Zero = Field(validation_alias="cg_product_height_in")
472
+ # 采购包装公制长度 [原字段 'cg_package_length']
473
+ package_length_metric: FloatOrNone2Zero = Field(validation_alias="cg_package_length")
474
+ # 采购包装英制长度 [原字段 'cg_package_length_in']
475
+ package_length_imperial: FloatOrNone2Zero = Field(validation_alias="cg_package_length_in")
476
+ # 采购包装公制宽度 [原字段 'cg_package_width']
477
+ package_width_metric: FloatOrNone2Zero = Field(validation_alias="cg_package_width")
478
+ # 采购包装英制宽度 [原字段 'cg_package_width_in']
479
+ package_width_imperial: FloatOrNone2Zero = Field(validation_alias="cg_package_width_in")
480
+ # 采购包装公制高度 [原字段 'cg_package_height']
481
+ package_height_metric: FloatOrNone2Zero = Field(validation_alias="cg_package_height")
482
+ # 采购包装英制高度 [原字段 'cg_package_height_in']
483
+ package_height_imperial: FloatOrNone2Zero = Field(validation_alias="cg_package_height_in")
484
+ # 采购外箱公制重量 [原字段 'cg_box_weight']
485
+ box_weight_metric: FloatOrNone2Zero = Field(validation_alias="cg_box_weight")
486
+ # 采购外箱公制重量单位 [原字段 'cg_box_weight_unit']
487
+ box_weight_metric_unit: str = Field(validation_alias="cg_box_weight_unit")
488
+ # 采购外箱英制重量 [原字段 'cg_box_weight_in']
489
+ box_weight_imperial: FloatOrNone2Zero = Field(validation_alias="cg_box_weight_in")
490
+ # 采购外箱英制重量单位 [原字段 'cg_box_weight_in_unit']
491
+ box_weight_imperial_unit: str = Field(validation_alias="cg_box_weight_in_unit")
492
+ # 采购外箱公制长度 [原字段 'cg_box_length']
493
+ box_length_metric: FloatOrNone2Zero = Field(validation_alias="cg_box_length")
494
+ # 采购外箱英制长度 [原字段 'cg_box_length_in']
495
+ box_length_imperial: FloatOrNone2Zero = Field(validation_alias="cg_box_length_in")
496
+ # 采购外箱公制宽度 [原字段 'cg_box_width']
497
+ box_width_metric : FloatOrNone2Zero = Field(validation_alias="cg_box_width")
498
+ # 采购外箱英制宽度 [原字段 'cg_box_width_in']
499
+ box_width_imperial: FloatOrNone2Zero = Field(validation_alias="cg_box_width_in")
500
+ # 采购外箱公制高度 [原字段 'cg_box_height']
501
+ box_height_metric: FloatOrNone2Zero = Field(validation_alias="cg_box_height")
502
+ # 采购外箱英制高度 [原字段 'cg_box_height_in']
503
+ box_height_imperial: FloatOrNone2Zero = Field(validation_alias="cg_box_height_in")
504
+ # 采购外箱数量 [原字段 'cg_box_pcs']
505
+ box_qty: IntOrNone2Zero = Field(validation_alias="cg_box_pcs")
506
+ # fmt: on
507
+
508
+
509
+ class SpuProductSpecialAttr(BaseModel):
510
+ """领星本地SPU多属性产品特殊属性"""
511
+
512
+ # 特殊属性ID [原字段 'id']
513
+ special_attr_id: int = Field(validation_alias="id")
514
+ # 特殊属性值 [原字段 'value']
515
+ special_attr_value: str = Field(validation_alias="value")
516
+
517
+
518
+ class SpuProductCustomsBaseInfo(BaseModel):
519
+ """领星本地SPU多属性产品信息"""
520
+
521
+ # 产品特殊属性 [原字段 'special_attr']
522
+ special_attrs: list[SpuProductSpecialAttr] = Field(validation_alias="special_attr")
523
+ # 报关申报HS编码 (出口国) [原字段 'bg_export_hs_code']
524
+ customs_export_hs_code: str = Field(validation_alias="bg_export_hs_code")
525
+
526
+
527
+ class SpuProductCustomsInfo(BaseModel):
528
+ """领星本地产品海关申报信息"""
529
+
530
+ # fmt: off
531
+ # 基础产品信息 [原字段 'base']
532
+ base_info: SpuProductCustomsBaseInfo = Field(validation_alias="base")
533
+ # 海关报关信息
534
+ declaration: ProductCustomsDeclaration
535
+ # 海关清关信息
536
+ clearance: ProductCustomsClearance
537
+ # fmt: on
538
+
539
+
540
+ class SpuProductAuxiliaryMaterial(BaseModel):
541
+ """领星本地产品关联辅料"""
542
+
543
+ # 辅料ID
544
+ aux_id: int
545
+ # 辅料SKU
546
+ aux_sku: str
547
+ # 辅料名称
548
+ aux_name: str
549
+ # 辅料备注 [原字段 'remark']
550
+ aux_note: str = Field(validation_alias="remark")
551
+ # 辅料配比数量 [原字段 'aux_qty']
552
+ aux_ratio_qty: int = Field(validation_alias="aux_qty")
553
+ # 产品配比数据 [原字段 'sku_qty']
554
+ sku_ratio_qty: int = Field(validation_alias="sku_qty")
555
+ # 辅料采购数量 [原字段 'quantity']
556
+ purchase_qty: int = Field(validation_alias="quantity")
557
+ # 辅料采购价格 [原字段 'cg_price']
558
+ purchase_price: float = Field(validation_alias="cg_price")
559
+
560
+
561
+ class SpuProductDetailItemImage(BaseModel):
562
+ """领星本地SPU多属性产品详情项图片"""
563
+
564
+ # 图片ID [原字段 'pp_id']
565
+ image_id: int = Field(validation_alias="pp_id")
566
+ # 图片名称 [原字段 'pic_name']
567
+ image_name: str = Field(validation_alias="pic_name")
568
+ # 图片链接 [原字段 'pic_url']
569
+ image_url: str = Field(validation_alias="pic_url")
570
+ # 图片大小 (单位: Byte) [原字段 'pic_space']
571
+ image_size: int = Field(validation_alias="pic_space")
572
+ # 图片宽度 (单位: PX) [原字段 'pic_size_w']
573
+ image_width: int = Field(validation_alias="pic_size_w")
574
+ # 图片高度 (单位: PX) [原字段 'pic_size_h']
575
+ image_height: int = Field(validation_alias="pic_size_h")
576
+ # 图片类型 [原字段 'pic_type']
577
+ image_type: int = Field(validation_alias="pic_type")
578
+ # 是否为主图 (0: 否, 1: 是)
579
+ is_primary: int
580
+ # 领星本地产品ID
581
+ product_id: int
582
+
583
+
584
+ class SpuProductDetailItemAttribute(BaseModel):
585
+ """领星本地SPU多属性产品详情项属性"""
586
+
587
+ # 属性ID [原字段 'pa_id']
588
+ attr_id: int = Field(validation_alias="pa_id")
589
+ # 属性值ID [原字段 'pai_id']
590
+ attr_value_id: str = Field(validation_alias="pai_id")
591
+ # 属性值名称 [原字段 'pai_name']
592
+ attr_value_name: str = Field(validation_alias="pai_name")
593
+
594
+
595
+ class SpuProductDetailItem(BaseModel):
596
+ """领星本地SPU多属性产品详情项"""
597
+
598
+ # fmt: off
599
+ # 领星本地SKU [原字段 'sku']
600
+ lsku: str = Field(validation_alias="sku")
601
+ # 领星本地产品ID
602
+ product_id: int
603
+ # 领星本地产品名称
604
+ product_name: str
605
+ # 产品图片链接 [原字段 'pic_url']
606
+ image_url: str = Field(validation_alias="pic_url")
607
+ # 产品图片列表 [原字段 'pic_list']
608
+ images: list[SpuProductDetailItemImage] = Field(validation_alias="pic_list")
609
+ # 产品属性列表 [原字段 'attribute']
610
+ attributes: list[SpuProductDetailItemAttribute] = Field(validation_alias="attribute")
611
+ # fmt: on
612
+
613
+
614
+ class SpuProductDetail(BaseModel):
615
+ """领星本地SPU多属性产品详情"""
616
+
617
+ # fmt: off
618
+ # 领星SPU多属性产品ID [原字段 'ps_id']
619
+ spu_id: int = Field(validation_alias="ps_id")
620
+ # 领星SPU多属性产品编码
621
+ spu: str
622
+ # 领星SPU多属性产品名称
623
+ spu_name: str
624
+ # 领星本地产品分类ID [原字段 'cid']
625
+ category_id: int = Field(validation_alias="cid")
626
+ # 领星本地产品分类名称
627
+ category_name: str
628
+ # 领星本地产品品牌ID [原字段 'bid']
629
+ brand_id: int = Field(validation_alias="bid")
630
+ # 领星本地产品品牌名称
631
+ brand_name: str
632
+ # 产品图片链接 [原字段 'pic_url']
633
+ image_url: str = Field(validation_alias="pic_url")
634
+ # 产品状态 (0: 停售, 1: 在售, 2: 开发中, 3: 清仓) [原字段 'status']
635
+ status: int
636
+ # 产品状态描述 [原字段 'status_text']
637
+ status_desc: str = Field(validation_alias="status_text")
638
+ # 产品型号 [原字段 'model']
639
+ product_model: str = Field(validation_alias="model")
640
+ # 产品单位 [原字段 'unit']
641
+ product_unit: str = Field(validation_alias="unit")
642
+ # 产品描述 [原字段 'description']
643
+ product_description: str = Field(validation_alias="description")
644
+ # 创建者用户ID (Account.user_id) [原字段 'create_uid']
645
+ product_creator_id: int = Field(validation_alias="create_uid")
646
+ # 创建者姓名 (Account.display_name) [原字段 'create_user']
647
+ product_creator_name: str = Field(validation_alias="create_user")
648
+ # 产品开发者用户ID (Account.user_id) [原字段 'developer_uid']
649
+ product_developer_id: int = Field(validation_alias="developer_uid")
650
+ # 产品开发者姓名 (Account.display_name) [原字段 'developer']
651
+ product_developer_name: str = Field(validation_alias="developer")
652
+ # 产品负责人用户ID列表 (Account.user_id) [原字段 'product_duty_uids']
653
+ operator_ids: list[int] = Field(validation_alias="product_duty_uids")
654
+ # 产品负责人用户信息列表 [原字段 'product_duty_users']
655
+ operators: list[SpuProductOperator] = Field(validation_alias="product_duty_users")
656
+ # 产品采购信息
657
+ purchase_info: SpuProductPurchaseInfo
658
+ # 海关申报信息 [原字段 'logistics']
659
+ customs_info: SpuProductCustomsInfo = Field(validation_alias="logistics")
660
+ # 关联辅料列表 [原字段 'aux_relation_list']
661
+ auxiliary_materials: list[SpuProductAuxiliaryMaterial] = Field(validation_alias="aux_relation_list")
662
+ # 标准产品列表 [原字段 'sku_list']
663
+ items: list[SpuProductDetailItem] = Field(validation_alias="sku_list")
664
+ # 附件信息列表 [原字段 'attachmentFiles']
665
+ attachments: list[base_schema.AttachmentFile] = Field(validation_alias="attachmentFiles")
666
+ # fmt: on
667
+
668
+
669
+ class SpuProductDetailData(ResponseV1):
670
+ """领星本地SPU多属性产品详情"""
671
+
672
+ data: SpuProductDetail
673
+
674
+
675
+ # . Edit SPU Product
676
+ class EditSpuProductItem(BaseModel):
677
+ """领星本地SPU多属性产品编辑结果项"""
678
+
679
+ # 领星本地SKU [原字段 'sku']
680
+ lsku: str = Field(validation_alias="sku")
681
+ # 领星本地产品ID
682
+ product_id: int
683
+
684
+
685
+ class EditSpuProduct(BaseModel):
686
+ """领星本地SPU多属性产品编辑结果"""
687
+
688
+ # 领星SPU多属性产品ID [原字段 'ps_id']
689
+ spu_id: int = Field(validation_alias="ps_id")
690
+ # 领星SPU多属性产品列表 [原字段 'sku_list']
691
+ items: list[EditSpuProductItem] = Field(validation_alias="sku_list")
692
+
693
+
694
+ class EditSpuProductResult(ResponseResult):
695
+ """领星本地SPU多属性产品编辑结果"""
696
+
697
+ data: EditSpuProduct
698
+
699
+
700
+ # . Bundle Product
701
+ class BundleProductItem(BaseModel):
702
+ """领星本地产品组合信息"""
703
+
704
+ # 子产品SKU [原字段 'sku']
705
+ lsku: str = Field(validation_alias="sku")
706
+ # 领星本地子产品ID [原字段 'productId']
707
+ product_id: int = Field(validation_alias="productId")
708
+ # 子产品捆绑数量 [原字段 'bundledQty']
709
+ bundle_qty: int = Field(validation_alias="bundledQty")
710
+ # 子产品费用比例
711
+ cost_ratio: float
712
+
713
+
714
+ class BundleProduct(BaseModel):
715
+ """领星本地产品组合信息"""
716
+
717
+ # fmt: off
718
+ # 捆绑产品ID [原字段 'id']
719
+ bundle_id: int = Field(validation_alias="id")
720
+ # 捆绑产品SKU [原字段 'sku']
721
+ bundle_sku: str = Field(validation_alias="sku")
722
+ # 捆绑产品名称 [原字段 'product_name']
723
+ bundle_name: str = Field(validation_alias="product_name")
724
+ # 捆绑产品采购价 [原字段 'cg_price']
725
+ purchase_price: float = Field(validation_alias="cg_price")
726
+ # 捆绑产品状态描述 [原字段 'status_text']
727
+ status_desc: str = Field(validation_alias="status_text")
728
+ # 捆绑产品列表 [原字段 'bundled_products']
729
+ items: list[BundleProductItem] = Field(validation_alias="bundled_products")
730
+ # fmt: on
731
+
732
+
733
+ class BundleProducts(ResponseV1):
734
+ """领星本地产品组合列表"""
735
+
736
+ data: list[BundleProduct]
737
+
738
+
739
+ # . Edit Bundle Product
740
+ class EditBundleProduct(BaseModel):
741
+ """领星本地产品组合编辑结果"""
742
+
743
+ # 捆绑产品ID [原字段 'product_id']
744
+ bundle_id: int = Field(validation_alias="product_id")
745
+ # 捆绑产品SKU [原字段 'sku']
746
+ bundle_sku: str = Field(validation_alias="sku")
747
+ # 捆绑产品SKU识别码
748
+ sku_identifier: str
749
+
750
+
751
+ class EditBundleProductResult(ResponseResult):
752
+ """领星本地产品组合编辑结果"""
753
+
754
+ data: EditBundleProduct
755
+
756
+
757
+ # . Auxiliary Material
758
+ class AuxiliaryMaterialAssociate(BaseModel):
759
+ """领星本地产品辅料关联的产品信息"""
760
+
761
+ # 领星本地产品SKU [原字段 'sku']
762
+ lsku: str = Field(validation_alias="sku")
763
+ # 领星本地产品ID [原字段 'pid']
764
+ product_id: int = Field(validation_alias="pid")
765
+ # 领星本地产品名称
766
+ product_name: str
767
+ # 产品关联辅料的数量 [原字段 'quantity']
768
+ aux_qty: int = Field(validation_alias="quantity")
769
+ # 辅料配比数量 [原字段 'aux_qty']
770
+ aux_ratio_qty: int = Field(validation_alias="aux_qty")
771
+ # 产品配比数据 [原字段 'sku_qty']
772
+ sku_ratio_qty: int = Field(validation_alias="sku_qty")
773
+
774
+
775
+ class AuxiliaryMaterial(BaseModel):
776
+ """领星本地产品辅料信息"""
777
+
778
+ # fmt: off
779
+ # 辅料分类ID [原字段 'cid']
780
+ category_id: int = Field(validation_alias="cid")
781
+ # 辅料ID [原字段 'id']
782
+ aux_id: int = Field(validation_alias="id")
783
+ # 辅料SKU [原字段 'sku']
784
+ aux_sku: str = Field(validation_alias="sku")
785
+ # 辅料名称 [原字段 'product_name']
786
+ aux_name: str = Field(validation_alias="product_name")
787
+ # 辅料净重 [原字段 'cg_product_net_weight']
788
+ aux_net_weight: float = Field(validation_alias="cg_product_net_weight")
789
+ # 辅料长度 [原字段 'cg_product_length']
790
+ aux_length: float = Field(validation_alias="cg_product_length")
791
+ # 辅料宽度 [原字段 'cg_product_width']
792
+ aux_width: float = Field(validation_alias="cg_product_width")
793
+ # 辅料高度 [原字段 'cg_product_height']
794
+ aux_height: float = Field(validation_alias="cg_product_height")
795
+ # 辅料备注 [原字段 'remark']
796
+ aux_note: str = Field(validation_alias="remark")
797
+ # 辅料采购价格 [原字段 'cg_price']
798
+ purchase_price: float = Field(validation_alias="cg_price")
799
+ # 辅料关联的产品列表 [原字段 'aux_relation_product']
800
+ associates: list[AuxiliaryMaterialAssociate] = Field(validation_alias="aux_relation_product")
801
+ # 供应商报价信息列表 [原字段 'supplier_quote']
802
+ supplier_quotes: list[ProductSupplierQuote] = Field(validation_alias="supplier_quote")
803
+ # fmt: on
804
+
805
+
806
+ class AuxiliaryMaterials(ResponseV1):
807
+ """领星本地产品辅料列表"""
808
+
809
+ data: list[AuxiliaryMaterial]
810
+
811
+
812
+ # . Edit Auxiliary Material
813
+ class EditAuxiliaryMaterial(BaseModel):
814
+ """领星本地产品辅料编辑结果"""
815
+
816
+ # 辅料ID [原字段 'product_id']
817
+ aux_id: int = Field(validation_alias="product_id")
818
+ # 辅料SKU [原字段 'sku']
819
+ aux_sku: str = Field(validation_alias="sku")
820
+ # 辅料SKU识别码
821
+ sku_identifier: str
822
+
823
+
824
+ class EditAuxiliaryMaterialResult(ResponseResult):
825
+ """领星本地产品辅料编辑结果"""
826
+
827
+ data: EditAuxiliaryMaterial
828
+
829
+
830
+ # . Product Codes
831
+ class ProductCode(BaseModel):
832
+ # 产品编码 ID [原字段 'id']
833
+ code_id: int = Field(validation_alias="id")
834
+ # 产品编码 [原字段 'commodity_code']
835
+ code: str = Field(validation_alias="commodity_code")
836
+ # 编码类型
837
+ code_type: str
838
+ # 编码备注 [原字段 'remark']
839
+ code_note: str = Field(validation_alias="remark")
840
+ # 编码状态 (0: 未使用, 1: 已使用) [原字段 'is_used']
841
+ status: int = Field(validation_alias="is_used")
842
+ # 编码状态描述 [原字段 'is_used_desc']
843
+ status_desc: str = Field(validation_alias="is_used_desc")
844
+ # 创建人的用户ID (Account.user_id) [原字段 'created_user_id']
845
+ create_user_id: int = Field(validation_alias="created_user_id")
846
+ # 创建时间 (北京时间) [原字段 'gmt_create']
847
+ create_time: str = Field(validation_alias="gmt_create")
848
+ # 使用人的用户ID (Account.user_id)
849
+ use_user_id: int
850
+ # 使用时间 (北京时间)
851
+ use_time: str
852
+
853
+
854
+ class ProductCodes(ResponseV1, FlattenDataList):
855
+ """产品编码 (UPC/EAN/ISBN)"""
856
+
857
+ data: list[ProductCode]
858
+
859
+
860
+ # . Product Global Tag
861
+ class ProductGlobalTag(BaseModel):
862
+ """领星本地产品全局标签信息"""
863
+
864
+ # 全局标签ID [原字段 'label_id']
865
+ tag_id: str = Field(validation_alias="label_id")
866
+ # 全局标签名称 [原字段 'label_name']
867
+ tag_name: str = Field(validation_alias="label_name")
868
+ # 全局标签创建时间 (北京时间, 时间戳) [原字段 'gmt_created']
869
+ create_time_ts: int = Field(validation_alias="gmt_created")
870
+
871
+
872
+ class ProductGlobalTags(ResponseV1, FlattenDataList):
873
+ """领星本地产品全局标签信息"""
874
+
875
+ data: list[ProductGlobalTag]
876
+
877
+
878
+ # . Create Product Global Tag
879
+ class CreateProductGlobalTag(BaseModel):
880
+ """创建产品全局标签结果"""
881
+
882
+ # 全局标签ID [原字段 'label_id']
883
+ tag_id: str = Field(validation_alias="label_id")
884
+ # 全局标签名称 [原字段 'label_name']
885
+ tag_name: str = Field(validation_alias="label_name")
886
+
887
+
888
+ class CreateProductGlobalTagResult(ResponseResult):
889
+ """创建产品全局标签结果"""
890
+
891
+ data: CreateProductGlobalTag
892
+
893
+
894
+ # . Product Global Attributes
895
+ class ProductGlobalAttributeValue(BaseModel):
896
+ """领星本地产品全局属性值"""
897
+
898
+ # 产品属性ID 【原字段 'pa_id'】
899
+ attr_id: int = Field(validation_alias="pa_id")
900
+ # 产品属性值ID [原字段 'pai_id']
901
+ attr_value_id: int = Field(validation_alias="pai_id")
902
+ # 产品属性值编码 [原字段 'attr_val_code']
903
+ attr_value_code: str = Field(validation_alias="attr_val_code")
904
+ # 产品属性值 [原字段 'attr_value']
905
+ attr_value: str
906
+ # 产品属性值创建时间 (北京时间)
907
+ create_time: str
908
+
909
+
910
+ class ProductGlobalAttribute(BaseModel):
911
+ """领星本地产品全局属性"""
912
+
913
+ # 产品属性ID [原字段 'pa_id']
914
+ attr_id: int = Field(validation_alias="pa_id")
915
+ # 产品属性名称
916
+ attr_name: str
917
+ # 产品属性编码
918
+ attr_code: str
919
+ # 产品子属性列表 [原字段 'item_list']
920
+ attr_values: list[ProductGlobalAttributeValue] = Field(validation_alias="item_list")
921
+ # 产品属性创建时间 (北京时间)
922
+ create_time: str
923
+
924
+
925
+ class ProductGlobalAttributes(ResponseV1, FlattenDataList):
926
+ """领星本地产品全局属性"""
927
+
928
+ data: list[ProductGlobalAttribute]
929
+
930
+
931
+ # . Product Brand
932
+ class ProductBrand(BaseModel):
933
+ """领星本地产品品牌信息"""
934
+
935
+ # 领星本地品牌ID [原字段 'bid']
936
+ brand_id: int = Field(validation_alias="bid")
937
+ # 品牌名称 [原字段 'title']
938
+ brand_name: str = Field(validation_alias="title")
939
+ # 品牌编码
940
+ brand_code: str
941
+
942
+
943
+ class ProductBrands(ResponseV1):
944
+ """领星本地产品品牌列表"""
945
+
946
+ data: list[ProductBrand]
947
+
948
+
949
+ # . Edit Product Brand
950
+ class EditProductBrand(BaseModel):
951
+ """更新产品品牌结果"""
952
+
953
+ # 添加/编辑的产品品牌ID [原字段 'id']
954
+ brand_id: int = Field(validation_alias="id")
955
+ # 添加/编辑的产品品牌名称 [原字段 'title']
956
+ brand_name: str = Field(validation_alias="title")
957
+ # 添加/编辑的产品品牌编码
958
+ brand_code: str
959
+
960
+
961
+ class EditProductBrandsResult(ResponseResult):
962
+ """更新产品品牌结果"""
963
+
964
+ data: list[EditProductBrand]
965
+
966
+
967
+ # . Product Category
968
+ class ProductCategory(BaseModel):
969
+ """领星本地产品分类信息"""
970
+
971
+ # 领星本地产品分类ID [原字段 'cid']
972
+ category_id: int = Field(validation_alias="cid")
973
+ # 分类名称 [原字段 'title']
974
+ category_name: str = Field(validation_alias="title")
975
+ # 分类编码
976
+ category_code: str
977
+ # 父分类ID [原字段 'parent_cid']
978
+ parent_category_id: int = Field(validation_alias="parent_cid")
979
+
980
+
981
+ class ProductCategories(ResponseV1):
982
+ """领星本地产品分类列表"""
983
+
984
+ data: list[ProductCategory]
985
+
986
+
987
+ # . Edit Product Category
988
+ class EditProductCategory(BaseModel):
989
+ """更新产品分类结果"""
990
+
991
+ # 添加/编辑的产品分类ID [原字段 'id']
992
+ category_id: int = Field(validation_alias="id")
993
+ # 添加/编辑的产品分类名称 [原字段 'title']
994
+ category_name: str = Field(validation_alias="title")
995
+ # 添加/编辑的产品分类编码
996
+ category_code: str
997
+ # 父分类ID [原字段 'parent_cid']
998
+ parent_category_id: str = Field(validation_alias="parent_cid")
999
+
1000
+
1001
+ class EditProductCategoriesResult(ResponseResult):
1002
+ """更新产品分类结果"""
1003
+
1004
+ data: list[EditProductCategory]