pbl_domain_ext/models/pbl_domain_ref.json

43 lines
3.3 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": [
"pbl_domain_ref",
"world/scene/entity 薄扩展关联表M8不改基表",
"id",
"记录复用平台 world/scene/entity 基表记录与 PBL 租户/蓝图/班级/团队的关联;基表无 tenant_idPBL 多租户隔离由本表补齐。UNIQUE(tenant_id,ref_type,ref_id)。权威 DDLdata-model.md §J1表总账pbls_spec.json tables_by_module.pbl_domain_ext=1、tables_total=36。"
],
"fields": [
{"name": "id", "type": "bigint", "primary": true, "autoincr": true, "notnull": true, "comment": "主键"},
{"name": "tenant_id", "type": "varchar(64)", "notnull": true, "comment": "租户IDPBL 多租户隔离维度,基表无此列)"},
{"name": "ref_type", "type": "varchar(32)", "notnull": true, "comment": "appcodes:pbl_domain_ref_type(world/scene/entity)"},
{"name": "ref_id", "type": "bigint", "notnull": true, "comment": "复用基表记录IDworld.id / scene.id / entity.id"},
{"name": "blueprint_id", "type": "varchar(64)", "notnull": false, "comment": "关联蓝图IDpbl_compiler apply_game_definition 落库后回写)"},
{"name": "class_id", "type": "varchar(64)", "notnull": false, "comment": "关联教学班IDpbl_governance.pbl_class"},
{"name": "team_id", "type": "varchar(64)", "notnull": false, "comment": "关联团队IDpbl_governance.pbl_team共享世界成员分组"},
{"name": "ext", "type": "json", "notnull": false, "comment": "扩展属性JSON薄扩展附加维度禁止改基表结构"},
{"name": "is_deleted", "type": "tinyint", "notnull": true, "default": "0", "comment": "软删标记0=有效 1=已解绑unbind_ref 置 1"},
{"name": "created_at", "type": "timestamp", "notnull": true, "default": "CURRENT_TIMESTAMP", "comment": "创建时间"},
{"name": "updated_at", "type": "timestamp", "notnull": true, "default": "CURRENT_TIMESTAMP", "comment": "更新时间ON UPDATE CURRENT_TIMESTAMP"}
],
"indexes": [
{"name": "PRIMARY", "fields": ["id"], "unique": true, "primary": true},
{"name": "uk_pbl_domain_ref", "fields": ["tenant_id", "ref_type", "ref_id"], "unique": true, "comment": "设计 §2UNIQUE(tenant_id,ref_type,ref_id)"},
{"name": "idx_pbl_domain_ref_bp", "fields": ["tenant_id", "blueprint_id"], "unique": false, "comment": "按蓝图查关联compiler/analytics"},
{"name": "idx_pbl_domain_ref_class", "fields": ["tenant_id", "class_id"], "unique": false, "comment": "按教学班查关联F-AS-03 班级维度)"},
{"name": "idx_pbl_domain_ref_team", "fields": ["tenant_id", "team_id"], "unique": false, "comment": "按团队查关联US-13 共享世界分组)"},
{"name": "idx_pbl_domain_ref_type", "fields": ["ref_type", "ref_id"], "unique": false, "comment": "悬挂引用一致性检查(左连接基表)"}
],
"codes": [
{
"code": "pbl_domain_ref_type",
"name": "域扩展关联类型",
"owner": "pbl_appcodes",
"items": [
{"value": "world", "label": "世界(复用基表 world"},
{"value": "scene", "label": "场景(复用基表 scene"},
{"value": "entity", "label": "实体(复用基表 entity"}
],
"note": "编码由 pbl_appcodes 模块幂等注入,本模块只读引用,不重复写入编码表"
}
]
}