34 lines
1.9 KiB
JSON
34 lines
1.9 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "entity",
|
|
"title": "实体表",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{"name": "id", "title": "主键ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "world_id", "title": "所属世界", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "scene_id", "title": "所属场景", "type": "str", "length": 32, "nullable": "yes"},
|
|
{"name": "name", "title": "实体名称", "type": "str", "length": 255, "nullable": "no"},
|
|
{"name": "code", "title": "实体编码", "type": "str", "length": 64, "nullable": "no"},
|
|
{"name": "entity_type", "title": "实体类型", "type": "str", "length": 16, "nullable": "no", "default": "0"},
|
|
{"name": "status", "title": "状态", "type": "str", "length": 16, "nullable": "no", "default": "0"},
|
|
{"name": "attributes_json", "title": "实体属性JSON", "type": "text", "nullable": "yes"},
|
|
{"name": "created_at", "title": "创建时间", "type": "timestamp", "nullable": "no"},
|
|
{"name": "updated_at", "title": "更新时间", "type": "timestamp", "nullable": "yes"}
|
|
],
|
|
"indexes": [
|
|
{"name": "idx_entity_code", "idxtype": "unique", "idxfields": ["code"]},
|
|
{"name": "idx_entity_world", "idxtype": "index", "idxfields": ["world_id"]},
|
|
{"name": "idx_entity_scene", "idxtype": "index", "idxfields": ["scene_id"]}
|
|
],
|
|
"codes": [
|
|
{"field": "world_id", "table": "world", "valuefield": "id", "textfield": "name"},
|
|
{"field": "scene_id", "table": "scene", "valuefield": "id", "textfield": "name"},
|
|
{"field": "entity_type", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='entity_type'"},
|
|
{"field": "status", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='entity_status'"}
|
|
]
|
|
}
|