198 lines
3.9 KiB
JSON
198 lines
3.9 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "pbl_domain_ref",
|
|
"title": "PBL基础域薄扩展关联表(world/scene/entity)",
|
|
"primary": [
|
|
"id"
|
|
],
|
|
"catelog": "relation"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "主键",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "tenant_id",
|
|
"title": "租户ID(打头)",
|
|
"type": "str",
|
|
"length": 64,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "ref_type",
|
|
"title": "关联对象类型(world/scene/entity)",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "ref_id",
|
|
"title": "基表记录ID(world.id/scene.id/entity.id,基表主键为str32)",
|
|
"type": "str",
|
|
"length": 64,
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "ref_code",
|
|
"title": "基表记录编码快照(只读冗余,不回写基表)",
|
|
"type": "str",
|
|
"length": 64,
|
|
"nullable": "no",
|
|
"default": ""
|
|
},
|
|
{
|
|
"name": "ref_name",
|
|
"title": "基表记录名称快照(只读冗余,不回写基表)",
|
|
"type": "str",
|
|
"length": 128,
|
|
"nullable": "no",
|
|
"default": ""
|
|
},
|
|
{
|
|
"name": "blueprint_id",
|
|
"title": "关联蓝图ID(pbl_blueprint主键,str32)",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"default": ""
|
|
},
|
|
{
|
|
"name": "class_id",
|
|
"title": "班级ID",
|
|
"type": "str",
|
|
"length": 64,
|
|
"nullable": "no",
|
|
"default": ""
|
|
},
|
|
{
|
|
"name": "team_id",
|
|
"title": "团队ID",
|
|
"type": "str",
|
|
"length": 64,
|
|
"nullable": "no",
|
|
"default": ""
|
|
},
|
|
{
|
|
"name": "bind_state",
|
|
"title": "绑定状态(bound/unbound)",
|
|
"type": "str",
|
|
"length": 16,
|
|
"nullable": "no",
|
|
"default": "bound"
|
|
},
|
|
{
|
|
"name": "bind_at",
|
|
"title": "绑定时间",
|
|
"type": "timestamp"
|
|
},
|
|
{
|
|
"name": "ext_json",
|
|
"title": "扩展JSON(租户/班级/团队关联属性,设计§J1权威名)",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"name": "is_deleted",
|
|
"title": "逻辑删除标记(0正常/1已解绑)",
|
|
"type": "short",
|
|
"nullable": "no",
|
|
"default": "0"
|
|
},
|
|
{
|
|
"name": "creator_id",
|
|
"title": "创建人",
|
|
"type": "str",
|
|
"length": 64
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "创建时间",
|
|
"type": "timestamp",
|
|
"nullable": "no"
|
|
},
|
|
{
|
|
"name": "updater_id",
|
|
"title": "更新人",
|
|
"type": "str",
|
|
"length": 64
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "更新时间",
|
|
"type": "timestamp"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "uk_pbl_domain_ref",
|
|
"idxtype": "unique",
|
|
"idxfields": [
|
|
"tenant_id",
|
|
"ref_type",
|
|
"ref_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_pbl_domain_ref_tenant_type",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"tenant_id",
|
|
"ref_type"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_pbl_domain_ref_blueprint",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"tenant_id",
|
|
"blueprint_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_pbl_domain_ref_class",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"tenant_id",
|
|
"class_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_pbl_domain_ref_team",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"tenant_id",
|
|
"team_id"
|
|
]
|
|
},
|
|
{
|
|
"name": "idx_pbl_domain_ref_state",
|
|
"idxtype": "index",
|
|
"idxfields": [
|
|
"tenant_id",
|
|
"bind_state",
|
|
"is_deleted"
|
|
]
|
|
}
|
|
],
|
|
"codes": [
|
|
{
|
|
"field": "ref_type",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='pbl_domain_ref_type'"
|
|
},
|
|
{
|
|
"field": "bind_state",
|
|
"table": "appcodes_kv",
|
|
"valuefield": "k",
|
|
"textfield": "v",
|
|
"cond": "parentid='pbl_bind_state'"
|
|
}
|
|
]
|
|
} |