- product_category: org_id scoped tree, product_table_name -> product_type - product: org_id scoped, added extra_json for custom attributes, product_type field - product_type_config: org_id + operator_id dual isolation, unique key on (org_id, operator_id, category_id, config_name) - All 18 API endpoints enforce org_id filtering via ServerEnv - core.py: all methods accept optional org_id, default to current user's org - CRUD definitions: logined_userorgid set to org_id on all lists - init/data.json: removed hardcoded global categories (managed per reseller) - Rebuilt mysql.ddl.sql and all CRUD UI files
51 lines
2.0 KiB
JSON
51 lines
2.0 KiB
JSON
{
|
|
"appcodes": [
|
|
{
|
|
"id": "product_status",
|
|
"name": "产品状态",
|
|
"hierarchy_flg": "0"
|
|
},
|
|
{
|
|
"id": "product_price_type",
|
|
"name": "产品价格类型",
|
|
"hierarchy_flg": "0"
|
|
},
|
|
{
|
|
"id": "product_category_status",
|
|
"name": "产品类别状态",
|
|
"hierarchy_flg": "0"
|
|
},
|
|
{
|
|
"id": "has_product_flg",
|
|
"name": "是否可挂产品",
|
|
"hierarchy_flg": "0"
|
|
},
|
|
{
|
|
"id": "product_type",
|
|
"name": "产品类型标识",
|
|
"hierarchy_flg": "0"
|
|
}
|
|
],
|
|
"appcodes_kv": [
|
|
{"id": "product_status", "parentid": "", "k": "1", "v": "启用"},
|
|
{"id": "product_status", "parentid": "", "k": "0", "v": "禁用"},
|
|
|
|
{"id": "product_price_type", "parentid": "", "k": "1", "v": "固定价格"},
|
|
{"id": "product_price_type", "parentid": "", "k": "2", "v": "阶梯价格"},
|
|
{"id": "product_price_type", "parentid": "", "k": "3", "v": "议价"},
|
|
|
|
{"id": "product_category_status", "parentid": "", "k": "1", "v": "启用"},
|
|
{"id": "product_category_status", "parentid": "", "k": "0", "v": "禁用"},
|
|
|
|
{"id": "has_product_flg", "parentid": "", "k": "1", "v": "是"},
|
|
{"id": "has_product_flg", "parentid": "", "k": "0", "v": "否"},
|
|
|
|
{"id": "product_type", "parentid": "", "k": "telecom", "v": "通信服务"},
|
|
{"id": "product_type", "parentid": "", "k": "cloud", "v": "云服务"},
|
|
{"id": "product_type", "parentid": "", "k": "data", "v": "数据服务"},
|
|
{"id": "product_type", "parentid": "", "k": "api", "v": "API服务"},
|
|
{"id": "product_type", "parentid": "", "k": "custom", "v": "自定义"}
|
|
],
|
|
"_note_product_category": "产品类别树由每个 reseller (org_id) 自行管理,不在 init/data.json 中预设全局数据。新机构注册时自动创建根类别。"
|
|
}
|