From d8b0e44e825f05dc20c97503aa41f0f9c1bed1cc Mon Sep 17 00:00:00 2001 From: pipeline-agent Date: Sun, 30 Aug 2026 14:02:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=9F=9F=E6=A8=A1=E5=9E=8Bv2):=20script?= =?UTF-8?q?=E5=8A=A0bind=5Ftype/bind=5Fid/game=5Fid=E5=9B=9B=E7=BA=A7?= =?UTF-8?q?=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/script_engine.json | 152 +++++++++++++++++++++++++++++--------- 1 file changed, 117 insertions(+), 35 deletions(-) diff --git a/models/script_engine.json b/models/script_engine.json index 4930d20..7e9437e 100644 --- a/models/script_engine.json +++ b/models/script_engine.json @@ -1,36 +1,118 @@ { - "summary": [ - { - "name": "script_engine", - "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": "entity_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": "script_type", "title": "脚本类型", "type": "str", "length": 16, "nullable": "no", "default": "0"}, - {"name": "trigger_event", "title": "触发事件", "type": "str", "length": 64, "nullable": "yes"}, - {"name": "content", "title": "脚本内容", "type": "text", "nullable": "no"}, - {"name": "status", "title": "状态", "type": "str", "length": 16, "nullable": "no", "default": "0"}, - {"name": "created_at", "title": "创建时间", "type": "timestamp", "nullable": "no"}, - {"name": "updated_at", "title": "更新时间", "type": "timestamp", "nullable": "yes"} - ], - "indexes": [ - {"name": "idx_script_code", "idxtype": "unique", "idxfields": ["code"]}, - {"name": "idx_script_world", "idxtype": "index", "idxfields": ["world_id"]}, - {"name": "idx_script_entity", "idxtype": "index", "idxfields": ["entity_id"]} - ], - "codes": [ - {"field": "world_id", "table": "world", "valuefield": "id", "textfield": "name"}, - {"field": "scene_id", "table": "scene", "valuefield": "id", "textfield": "name"}, - {"field": "entity_id", "table": "entity", "valuefield": "id", "textfield": "name"}, - {"field": "script_type", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='script_type'"}, - {"field": "status", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='script_status'"} - ] -} + "summary": [ + { + "name": "script_engine", + "title": "脚本表", + "primary": [ + "id" + ], + "catelog": "entity" + } + ], + "fields": [ + { + "name": "id", + "title": "主键ID", + "type": "str", + "length": 32, + "nullable": "no" + }, + { + "name": "script_name", + "title": "脚本名称", + "type": "str", + "length": 100, + "nullable": "no" + }, + { + "name": "script_type", + "title": "脚本类型", + "type": "str", + "length": 32, + "nullable": "no", + "default": "0" + }, + { + "name": "content", + "title": "脚本内容", + "type": "text", + "nullable": "no" + }, + { + "name": "description", + "title": "描述", + "type": "str", + "length": 255 + }, + { + "name": "bind_type", + "title": "绑定级 game/world/scene/entity", + "type": "str", + "length": 16 + }, + { + "name": "bind_id", + "title": "绑定对象ID", + "type": "str", + "length": 32 + }, + { + "name": "game_id", + "title": "所属游戏ID(冗余)", + "type": "str", + "length": 32 + }, + { + "name": "status", + "title": "状态", + "type": "str", + "length": 32, + "nullable": "no", + "default": "1" + }, + { + "name": "created_at", + "title": "创建时间", + "type": "timestamp", + "nullable": "no" + }, + { + "name": "updated_at", + "title": "更新时间", + "type": "timestamp", + "nullable": "no" + } + ], + "indexes": [ + { + "name": "idx_script_name", + "idxtype": "index", + "idxfields": [ + "script_name" + ] + }, + { + "name": "idx_script_type", + "idxtype": "index", + "idxfields": [ + "script_type" + ] + } + ], + "codes": [ + { + "field": "script_type", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='script_type'" + }, + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='script_status'" + } + ] +} \ No newline at end of file