scene/models/scene.json
2026-08-29 12:44:22 +08:00

32 lines
1.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.

{
"summary": [
{
"table": "scene",
"primary": ["id"],
"engine": "InnoDB",
"comment": "场景表"
}
],
"fields": [
{"name": "id", "type": "str(32)", "nullable": false, "default": "", "comment": "主键"},
{"name": "world_id", "type": "str(32)", "nullable": false, "default": "", "comment": "所属世界(逻辑关联 world.id不加外键"},
{"name": "name", "type": "str(255)", "nullable": false, "default": "", "comment": "场景名称"},
{"name": "code", "type": "str(64)", "nullable": false, "default": "", "comment": "场景编码(唯一)"},
{"name": "description", "type": "text", "nullable": true, "comment": "描述"},
{"name": "scene_type", "type": "str(16)", "nullable": false, "default": "0", "comment": "场景类型appcodes scene_type默认 0"},
{"name": "status", "type": "str(16)", "nullable": false, "default": "0", "comment": "状态appcodes scene_status默认 0"},
{"name": "config_json", "type": "text", "nullable": true, "comment": "场景配置 JSON"},
{"name": "created_at", "type": "timestamp", "nullable": false, "comment": "创建时间"},
{"name": "updated_at", "type": "timestamp", "nullable": false, "comment": "更新时间"}
],
"indexes": [
{"name": "idx_scene_code", "fields": ["code"], "unique": true},
{"name": "idx_scene_world", "fields": ["world_id"], "unique": false}
],
"codes": [
{"field": "world_id", "table": "world", "valuefield": "id", "textfield": "name"},
{"field": "scene_type", "table": "appcodes_kv", "cond": "parentid='scene_type'", "valuefield": "k", "textfield": "v"},
{"field": "status", "table": "appcodes_kv", "cond": "parentid='scene_status'", "valuefield": "k", "textfield": "v"}
]
}