新增模型: product_resource, product_resource_supplier, product_subscription, product_usage_log 新增API: 15个.dspy端点(资源绑定/供应商管理/订购/超额/消耗/统计) 新增UI: 4个管理界面(资源绑定/供应商关联/订购管理/消费记录) 核心逻辑: ProductManager新增 bind/unbind/subscribe/product_use/check_quota 等完整业务方法 设计文档: DESIGN.md 完整架构规范
46 lines
1.8 KiB
JSON
46 lines
1.8 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "product_resource_supplier",
|
|
"title": "产品资源供应商关联表",
|
|
"primary": ["id"],
|
|
"catelog": "relation"
|
|
}
|
|
],
|
|
"fields": [
|
|
{"name": "id", "title": "主键ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "product_resource_id", "title": "产品资源绑定ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "supplier_org_id", "title": "供应商机构ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "priority", "title": "优先级", "type": "int", "default": "1"},
|
|
{"name": "weight", "title": "权重", "type": "int", "default": "100"},
|
|
{"name": "status", "title": "状态", "type": "char", "length": 1, "default": "1"},
|
|
{"name": "created_at", "title": "创建时间", "type": "datetime", "nullable": "no"}
|
|
],
|
|
"indexes": [
|
|
{"name": "idx_prs_resource", "idxtype": "index", "idxfields": ["product_resource_id"]},
|
|
{"name": "idx_prs_supplier", "idxtype": "index", "idxfields": ["supplier_org_id"]},
|
|
{"name": "idx_prs_unique", "idxtype": "unique", "idxfields": ["product_resource_id", "supplier_org_id"]}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "product_resource_id",
|
|
"table": "product_resource",
|
|
"valuefield": "id",
|
|
"textfield": "resource_ref_name"
|
|
},
|
|
{
|
|
"field": "supplier_org_id",
|
|
"table": "supplychain.suppliers",
|
|
"valuefield": "org_id",
|
|
"textfield": "supplier_name"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='product_status'"
|
|
}
|
|
]
|
|
}
|