first commit
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
PRIMARY_FIELD_NAME = "货品编码"
|
||||
PRIMARY_FIELD_SOURCE = "统一规格编码"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class BrandSyncTarget:
|
||||
brand_name: str
|
||||
table_name: str
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class FieldSpec:
|
||||
feishu_name: str
|
||||
source_name: str
|
||||
field_type: int
|
||||
formatter: str | None = None
|
||||
scale: int | None = None
|
||||
|
||||
|
||||
BRAND_SYNC_TARGETS = [
|
||||
BrandSyncTarget(brand_name="羽心堂", table_name="羽心堂"),
|
||||
]
|
||||
|
||||
FIELD_SPECS = [
|
||||
FieldSpec("品牌", "品牌名称", 1),
|
||||
FieldSpec("分类", "一级分类", 1),
|
||||
FieldSpec("产品类别", "货品简称", 1),
|
||||
FieldSpec("货品名称", "商品名称", 1),
|
||||
FieldSpec("条形码", "条形码", 1),
|
||||
FieldSpec("零售价", "零售价", 2, "0.00", 2),
|
||||
FieldSpec("店铺名称", "店铺名称", 1),
|
||||
FieldSpec("店铺可用库存", "店铺挂单量", 2, "0", 0),
|
||||
FieldSpec("总库存", "总库存", 2, "0", 0),
|
||||
FieldSpec("本月销售数量", "本月销售数量", 2, "0", 0),
|
||||
FieldSpec("上月销售数量", "上月销售数量", 2, "0", 0),
|
||||
FieldSpec("上上月销售数量", "上上月销售数量", 2, "0", 0),
|
||||
]
|
||||
|
||||
LEGACY_NAME_MAP = {
|
||||
"品牌名称": "品牌",
|
||||
"一级分类": "分类",
|
||||
"货品简称": "产品类别",
|
||||
"商品名称": "货品名称",
|
||||
"店铺挂单量": "店铺可用库存",
|
||||
"统一规格编码": PRIMARY_FIELD_NAME,
|
||||
}
|
||||
Reference in New Issue
Block a user