pbl_blueprint/pbl_blueprint/models/m1b/pbl_subobject_ext.json
2026-09-16 19:36:42 +08:00

173 lines
3.8 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.

{
"summary": [
{
"name": "pbl_subobject_ext",
"title": "PBL子对象扩展属性",
"primary": [
"id"
],
"catelog": "entity",
"comment": "M1b 表;索引一律 tenant_key 打头(tenant_key=COALESCE(tenant_id,'__PLATFORM__'),由 m1b_db.tenant_key() 统一计算);无 FOREIGN KEY;对 world/scene/entity/script 等复用域基表零改动(Q-OPEN-3)。"
}
],
"fields": [
{
"name": "id",
"title": "物理主键",
"type": "long",
"nullable": "no",
"comment": "AUTO_INCREMENT"
},
{
"name": "tenant_key",
"title": "租户键",
"type": "str",
"length": 64,
"nullable": "no",
"default": "",
"comment": "= COALESCE(tenant_id,'__PLATFORM__');索引打头列;应用层计算"
},
{
"name": "tenant_id",
"title": "租户ID",
"type": "str",
"length": 64,
"comment": "NULL = 平台公共模板的子对象扩展;非空 = 租户数据"
},
{
"name": "blueprint_id",
"title": "blueprint_id",
"type": "long",
"nullable": "no"
},
{
"name": "subobject_type",
"title": "子对象类型",
"type": "str",
"length": 32,
"nullable": "no",
"comment": "字典 pbl_subobject_type 的 7 类之一"
},
{
"name": "subobject_id",
"title": "蓝图子对象ID",
"type": "str",
"length": 64,
"nullable": "no",
"comment": "冗余列,owner_kind=blueprint 时与 subobject_ref 同值,便于按 M1A 子对象直查"
},
{
"name": "ext_key",
"title": "扩展字段键",
"type": "str",
"length": 64,
"nullable": "no",
"default": "",
"comment": "必须在 pbl_ext_field_def 中存在且 def_status=active"
},
{
"name": "ext_value",
"title": "扩展字段值",
"type": "text",
"comment": "统一字符串形态;json/bool/date 按 value_type 序列化"
},
{
"name": "ext_value_type",
"title": "ext_value_type",
"type": "str",
"length": 16,
"nullable": "no",
"default": "string"
},
{
"name": "field_def_id",
"title": "字段定义ID",
"type": "long",
"comment": "指向 pbl_ext_field_def.id(逻辑关联,无 FK)"
},
{
"name": "source",
"title": "source",
"type": "str",
"length": 32,
"nullable": "no",
"default": "manual"
},
{
"name": "status",
"title": "status",
"type": "str",
"length": 32,
"nullable": "no",
"default": "active"
},
{
"name": "created_by",
"title": "created_by",
"type": "str",
"length": 64
},
{
"name": "created_at",
"title": "created_at",
"type": "datetime"
},
{
"name": "updated_by",
"title": "updated_by",
"type": "str",
"length": 64
},
{
"name": "updated_at",
"title": "updated_at",
"type": "datetime"
}
],
"indexes": [
{
"name": "idx_ext_field_def",
"idxtype": "index",
"idxfields": [
"field_def_id"
]
},
{
"name": "idx_ext_obj",
"idxtype": "index",
"idxfields": [
"subobject_type",
"subobject_id"
]
},
{
"name": "idx_ext_tenant_bp_type",
"idxtype": "index",
"idxfields": [
"tenant_key",
"blueprint_id",
"subobject_type"
]
},
{
"name": "uk_ext_tenant_obj_key",
"idxtype": "unique",
"idxfields": [
"tenant_key",
"subobject_type",
"subobject_id",
"ext_key"
]
}
],
"codes": [
{
"field": "subobject_type",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='pbl_subobject_type'"
}
]
}