pipeline-app/pipeline_dist/models/distributor_pipeline.json
yumoqing 707b491345 fix: init/data.json格式修正+model codes补全
pipeline-core:
- pipelines.json codes cond: id -> parentid

pipeline-ops:
- init/data.json: 转为Format B(parentid/parentname/items)
- pipeline_pricing.json: +4 codes(pricing_type/currency/status/pipeline_id)
- pipeline_capacity.json: +2 codes(capacity_status/pipeline_id)
- pipeline_usage_log.json: +2 codes(usage_status/pipeline_id)

pipeline-dist:
- init/data.json: 转为Format B(parentid/parentname/items)
- distributors.json: +1 code(distributor_status)
- distributor_pipeline.json: +4 codes(markup_type/dp_status/外键)
2026-06-11 15:11:02 +08:00

141 lines
3.3 KiB
JSON

{
"summary": [
{
"name": "distributor_pipeline",
"title": "分销商-产线关联定价表",
"primary": [
"id"
]
}
],
"fields": [
{
"name": "id",
"title": "主键",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "distributor_id",
"title": "分销商ID",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "pipeline_id",
"title": "产线ID",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "custom_price",
"title": "自定义单价",
"type": "double",
"length": 15,
"dec": 4
},
{
"name": "markup_type",
"title": "加价方式",
"type": "str",
"length": 20
},
{
"name": "markup_value",
"title": "加价值",
"type": "double",
"length": 10,
"dec": 2
},
{
"name": "daily_limit",
"title": "日限额",
"type": "int",
"default": "0"
},
{
"name": "monthly_limit",
"title": "月限额",
"type": "int",
"default": "0"
},
{
"name": "today_usage",
"title": "今日已用",
"type": "int",
"default": "0"
},
{
"name": "month_usage",
"title": "本月已用",
"type": "int",
"default": "0"
},
{
"name": "status",
"title": "状态",
"type": "str",
"length": 20,
"default": "active"
},
{
"name": "created_at",
"title": "创建时间",
"type": "timestamp"
},
{
"name": "updated_at",
"title": "更新时间",
"type": "timestamp"
}
],
"indexes": [
{
"name": "idx_dp_dist_pipe",
"idxtype": "unique",
"idxfields": [
"distributor_id",
"pipeline_id"
]
},
{
"name": "idx_dp_distributor",
"idxtype": "index",
"idxfields": [
"distributor_id"
]
}
],
"codes": [
{
"field": "distributor_id",
"table": "distributors",
"valuefield": "id",
"textfield": "name"
},
{
"field": "pipeline_id",
"table": "pipelines",
"valuefield": "id",
"textfield": "name"
},
{
"field": "markup_type",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='markup_type'"
},
{
"field": "status",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='dp_status'"
}
]
}