pbl_blueprint/pbl_blueprint/json/m1b/pbl_subobject_ext.json
2026-09-16 17:17:53 +08:00

181 lines
4.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"tblname": "pbl_subobject_ext",
"params": {
"id": {
"type": "int",
"size": 20,
"notnull": true,
"default": 0,
"editable": false,
"query": false,
"summary": "物理主键(bigint AUTO_INCREMENT)"
},
"tenant_key": {
"type": "str",
"size": 32,
"notnull": true,
"default": "",
"editable": false,
"query": true,
"summary": "租户键 = COALESCE(tenant_id,'__PLATFORM__');索引打头列;应用层计算"
},
"tenant_id": {
"type": "str",
"size": 32,
"notnull": false,
"default": null,
"editable": true,
"query": true,
"summary": "租户ID(首业务字段,读写强制打头,缺失即 fail-closed);NULL=平台公共模板的子对象扩展,非空=租户数据"
},
"ext_code": {
"type": "str",
"size": 32,
"notnull": true,
"default": "",
"editable": true,
"query": true,
"summary": "扩展记录编码(业务主键,gen_code('SXE', tenant_id) 生成)"
},
"owner_kind": {
"type": "str",
"size": 16,
"notnull": true,
"default": "blueprint",
"editable": true,
"query": true,
"summary": "宿主类型 blueprint=真实蓝图子对象 / template=模板内容子对象",
"code": "pbl_ext_owner_kind"
},
"owner_id": {
"type": "str",
"size": 32,
"notnull": true,
"default": "",
"editable": true,
"query": true,
"summary": "宿主ID(blueprint→blueprint_id;template→template_code)"
},
"owner_version": {
"type": "int",
"notnull": true,
"default": 1,
"editable": true,
"query": true,
"summary": "宿主版本(blueprint→蓝图版本号;template→template_version),版本隔离避免跨版本串数据"
},
"subobject_type": {
"type": "str",
"size": 32,
"notnull": true,
"default": "",
"editable": true,
"query": true,
"summary": "子对象类型(7 类之一)",
"code": "pbl_subobject_type"
},
"subobject_ref": {
"type": "str",
"size": 64,
"notnull": true,
"default": "",
"editable": true,
"query": true,
"summary": "子对象归一引用(非空列:blueprint→M1A subobject_id;template→模板内临时 ID),参与唯一键杜绝 NULL 重复行"
},
"subobject_id": {
"type": "str",
"size": 32,
"notnull": false,
"default": "",
"editable": true,
"query": true,
"summary": "蓝图子对象ID(冗余列,owner_kind=blueprint 时与 subobject_ref 同值)"
},
"ext_key": {
"type": "str",
"size": 64,
"notnull": true,
"default": "",
"editable": true,
"query": true,
"summary": "扩展字段键(必须在 pbl_ext_field_def 中存在且 def_status=active,否则 PBL_EXT_FIELD_UNDEFINED)"
},
"ext_value": {
"type": "text",
"notnull": false,
"default": "",
"editable": true,
"query": false,
"summary": "扩展字段值(统一字符串形态;json/bool/date 按 value_type 序列化)"
},
"value_type": {
"type": "str",
"size": 16,
"notnull": true,
"default": "string",
"editable": false,
"query": true,
"summary": "值类型快照(写入时从 pbl_ext_field_def.value_type 快照,历史值可按当时类型解读)",
"code": "pbl_ext_value_type"
},
"field_def_id": {
"type": "int",
"size": 20,
"notnull": false,
"default": 0,
"editable": false,
"query": true,
"summary": "字段定义ID(指向 pbl_ext_field_def.id,逻辑关联无 FK)"
},
"sort_no": {
"type": "int",
"notnull": true,
"default": 0,
"editable": true,
"query": true,
"summary": "排序号"
},
"creator_id": {
"type": "str",
"size": 32,
"notnull": false,
"default": "",
"editable": false,
"query": true,
"summary": "创建人"
},
"create_time": {
"type": "datetime",
"notnull": true,
"default": null,
"editable": false,
"query": false,
"summary": "创建时间"
},
"update_time": {
"type": "datetime",
"notnull": true,
"default": null,
"editable": false,
"query": false,
"summary": "更新时间"
}
},
"editable": [
"api/pbl_subobject_ext/list.dspy",
"api/pbl_subobject_ext/edit.dspy",
"api/pbl_subobject_ext/view.dspy"
],
"browserfields": [
"ext_code",
"owner_kind",
"owner_id",
"subobject_type",
"subobject_ref",
"ext_key",
"ext_value",
"value_type"
]
}