- All 7 models: created_at/updated_at changed from datetime to timestamp type (DDL template auto-generates DEFAULT CURRENT_TIMESTAMP for timestamp type) - core.py: fix all sor.U() calls passing 3 args (id must be in data dict) - core.py: fix sor.I() misuse for INSERT (should be sor.C()) - API dspy updates: fix sor.U() 3-arg bug in category/product/type_config/resource/subscription/supplier - product_resource_supplier_update.dspy: add missing updated_at field
146 lines
3.4 KiB
JSON
146 lines
3.4 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "product_resource",
|
|
"title": "产品资源绑定表",
|
|
"primary": [
|
|
"id"
|
|
],
|
|
"catelog": "relation"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "主键ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "product_id",
|
|
"title": "产品ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "resource_type",
|
|
"title": "资源类型",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "resource_ref_id",
|
|
"title": "资源引用ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "resource_ref_name",
|
|
"title": "资源显示名",
|
|
"type": "str",
|
|
"length": 255
|
|
},
|
|
{
|
|
"name": "quota",
|
|
"title": "配额量",
|
|
"type": "double",
|
|
"length": 15,
|
|
"dec": 4,
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "quota_unit",
|
|
"title": "配额单位",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "priority",
|
|
"title": "优先级",
|
|
"type": "int",
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "overflow_product_id",
|
|
"title": "超额后转用产品ID",
|
|
"type": "str",
|
|
"length": 32
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "状态",
|
|
"type": "char",
|
|
"length": 1,
|
|
"default": "1"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "timestamp",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "更新时间",
|
|
"type": "datetime"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_pr_product",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"product_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_pr_resource",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"resource_type",
|
|
"resource_ref_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_pr_status",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"status"
|
|
]
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "product_id",
|
|
"table": "product",
|
|
"valuefield": "id",
|
|
"textfield": "product_name"
|
|
},
|
|
{
|
|
"field": "resource_type",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='resource_type'"
|
|
},
|
|
{
|
|
"field": "quota_unit",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='quota_unit'"
|
|
},
|
|
{
|
|
"field": "status",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='product_status'"
|
|
}
|
|
]
|
|
}
|