diff --git a/yao/models/assistant.mod.yao b/yao/models/assistant.mod.yao index 1022aee7..67c81499 100644 --- a/yao/models/assistant.mod.yao +++ b/yao/models/assistant.mod.yao @@ -178,47 +178,6 @@ } ], "relations": {}, - "indexes": [ - { - "name": "idx_assistant_id", - "columns": ["assistant_id"], - "type": "unique" - }, - { - "name": "idx_type", - "columns": ["type"], - "type": "index" - }, - { - "name": "idx_description", - "columns": ["description"], - "type": "index" - }, - { - "name": "idx_sort", - "columns": ["sort"], - "type": "index" - }, - { - "name": "idx_built_in", - "columns": ["built_in"], - "type": "index" - }, - { - "name": "idx_readonly", - "columns": ["readonly"], - "type": "index" - }, - { - "name": "idx_automated", - "columns": ["automated"], - "type": "index" - }, - { - "name": "idx_mentionable", - "columns": ["mentionable"], - "type": "index" - } - ], + "indexes": [], "option": { "timestamps": true, "soft_deletes": false } } diff --git a/yao/models/attachment.mod.yao b/yao/models/attachment.mod.yao index e11adcf6..ff1622d2 100644 --- a/yao/models/attachment.mod.yao +++ b/yao/models/attachment.mod.yao @@ -141,62 +141,6 @@ } ], "relations": {}, - "indexes": [ - { - "name": "idx_file_id", - "columns": ["file_id"], - "type": "unique" - }, - { - "name": "idx_uid", - "columns": ["uid"], - "type": "index" - }, - { - "name": "idx_guest", - "columns": ["guest"], - "type": "index" - }, - { - "name": "idx_manager", - "columns": ["manager"], - "type": "index" - }, - { - "name": "idx_content_type", - "columns": ["content_type"], - "type": "index" - }, - { - "name": "idx_name", - "columns": ["name"], - "type": "index" - }, - { - "name": "idx_public", - "columns": ["public"], - "type": "index" - }, - { - "name": "idx_gzip", - "columns": ["gzip"], - "type": "index" - }, - { - "name": "idx_bytes", - "columns": ["bytes"], - "type": "index" - }, - { - "name": "idx_collection_id", - "columns": ["collection_id"], - "type": "index" - }, - { - "name": "idx_status", - "columns": ["status"], - "type": "index" - } - ], + "indexes": [], "option": { "timestamps": true, "soft_deletes": false } } diff --git a/yao/models/audit.mod.yao b/yao/models/audit.mod.yao index 73e7788d..1bf901e3 100644 --- a/yao/models/audit.mod.yao +++ b/yao/models/audit.mod.yao @@ -214,76 +214,6 @@ ], "relations": {}, "indexes": [ - { - "name": "idx_event_id", - "columns": ["event_id"], - "type": "index" - }, - { - "name": "idx_operation", - "columns": ["operation"], - "type": "index" - }, - { - "name": "idx_category", - "columns": ["category"], - "type": "index" - }, - { - "name": "idx_severity", - "columns": ["severity"], - "type": "index" - }, - { - "name": "idx_user_id", - "columns": ["user_id"], - "type": "index" - }, - { - "name": "idx_session_id", - "columns": ["session_id"], - "type": "index" - }, - { - "name": "idx_client_ip", - "columns": ["client_ip"], - "type": "index" - }, - { - "name": "idx_target_resource", - "columns": ["target_resource"], - "type": "index" - }, - { - "name": "idx_resource_type", - "columns": ["resource_type"], - "type": "index" - }, - { - "name": "idx_source", - "columns": ["source"], - "type": "index" - }, - { - "name": "idx_application", - "columns": ["application"], - "type": "index" - }, - { - "name": "idx_success", - "columns": ["success"], - "type": "index" - }, - { - "name": "idx_request_id", - "columns": ["request_id"], - "type": "index" - }, - { - "name": "idx_trace_id", - "columns": ["trace_id"], - "type": "index" - }, { "name": "idx_user_operation", "columns": ["user_id", "operation"], diff --git a/yao/models/chat.mod.yao b/yao/models/chat.mod.yao index d23212e8..0b30e307 100644 --- a/yao/models/chat.mod.yao +++ b/yao/models/chat.mod.yao @@ -59,27 +59,6 @@ } ], "relations": {}, - "indexes": [ - { - "name": "idx_chat_id", - "columns": ["chat_id"], - "type": "unique" - }, - { - "name": "idx_assistant_id", - "columns": ["assistant_id"], - "type": "index" - }, - { - "name": "idx_sid", - "columns": ["sid"], - "type": "index" - }, - { - "name": "idx_silent", - "columns": ["silent"], - "type": "index" - } - ], + "indexes": [], "option": { "timestamps": true, "soft_deletes": false } } diff --git a/yao/models/config.mod.yao b/yao/models/config.mod.yao index 248a7d68..8797bf7e 100644 --- a/yao/models/config.mod.yao +++ b/yao/models/config.mod.yao @@ -66,27 +66,6 @@ } ], "relations": {}, - "indexes": [ - { - "name": "idx_key", - "columns": ["key"], - "type": "unique" - }, - { - "name": "idx_category", - "columns": ["category"], - "type": "index" - }, - { - "name": "idx_type", - "columns": ["type"], - "type": "index" - }, - { - "name": "idx_readonly", - "columns": ["readonly"], - "type": "index" - } - ], + "indexes": [], "option": { "timestamps": true, "soft_deletes": false } } diff --git a/yao/models/mcp.mod.yao b/yao/models/dsl.mod.yao similarity index 51% rename from yao/models/mcp.mod.yao rename to yao/models/dsl.mod.yao index 19dd0728..7e761e4c 100644 --- a/yao/models/mcp.mod.yao +++ b/yao/models/dsl.mod.yao @@ -1,10 +1,10 @@ { - "name": "mcp", - "label": "MCP", - "description": "MCP table for storing MCP client configuration", + "name": "dsl", + "label": "DSL", + "description": "DSL table for storing Yao DSL configurations", "table": { - "name": "mcp", - "comment": "MCP table" + "name": "dsl", + "comment": "DSL table" }, "columns": [ { @@ -14,43 +14,93 @@ "comment": "Unique identifier" }, { - "name": "mcp_id", + "name": "dsl_id", "type": "string", - "label": "MCP ID", - "comment": "MCP client identifier", + "label": "DSL ID", + "comment": "DSL identifier", "length": 200, "nullable": false, "unique": true, "index": true }, { - "name": "name", + "name": "type", "type": "string", - "label": "Name", - "comment": "MCP client name", + "label": "Type", + "comment": "DSL type (model, api, table, form, list, chart, dashboard, connector, store, schedule, flow, pipe, aigc, sui, etc.)", + "length": 50, + "nullable": false, + "index": true + }, + { + "name": "label", + "type": "string", + "label": "Label", + "comment": "DSL display label", "length": 200, "nullable": false, "index": true }, + { + "name": "path", + "type": "string", + "label": "Path", + "comment": "DSL file path", + "length": 500, + "nullable": true, + "index": true + }, + { + "name": "sort", + "type": "integer", + "label": "Sort", + "comment": "Sort order for data sorting", + "nullable": true, + "default": 0, + "index": true + }, { "name": "description", "type": "text", "label": "Description", - "comment": "MCP client description", + "comment": "DSL description", + "nullable": true + }, + { + "name": "tags", + "type": "json", + "label": "Tags", + "comment": "DSL tags for categorization and filtering", "nullable": true }, { "name": "dsl", "type": "json", "label": "DSL", - "comment": "MCP client DSL configuration in JSON format", + "comment": "DSL configuration in JSON format", "nullable": true }, + { + "name": "mtime", + "type": "timestamp", + "label": "Modification Time", + "comment": "File modification time (for file-based DSL)", + "nullable": true, + "index": true + }, + { + "name": "ctime", + "type": "timestamp", + "label": "Creation Time", + "comment": "File creation time (for file-based DSL)", + "nullable": true, + "index": true + }, { "name": "readonly", "type": "boolean", "label": "Readonly", - "comment": "MCP client readonly status", + "comment": "DSL readonly status", "default": false, "index": true }, @@ -58,7 +108,7 @@ "name": "built_in", "type": "boolean", "label": "Built In", - "comment": "Whether this is a built-in MCP client", + "comment": "Whether this is a built-in DSL", "default": false, "index": true }, @@ -98,37 +148,6 @@ } ], "relations": {}, - "indexes": [ - { - "name": "idx_mcp_id", - "columns": ["mcp_id"], - "type": "unique" - }, - { - "name": "idx_name", - "columns": ["name"], - "type": "index" - }, - { - "name": "idx_readonly", - "columns": ["readonly"], - "type": "index" - }, - { - "name": "idx_built_in", - "columns": ["built_in"], - "type": "index" - }, - { - "name": "idx_creator_id", - "columns": ["creator_id"], - "type": "index" - }, - { - "name": "idx_updater_id", - "columns": ["updater_id"], - "type": "index" - } - ], + "indexes": [], "option": { "timestamps": true, "soft_deletes": false } } diff --git a/yao/models/history.mod.yao b/yao/models/history.mod.yao index dc36ab28..7252c3ad 100644 --- a/yao/models/history.mod.yao +++ b/yao/models/history.mod.yao @@ -121,42 +121,6 @@ } ], "relations": {}, - "indexes": [ - { - "name": "idx_sid", - "columns": ["sid"], - "type": "index" - }, - { - "name": "idx_cid", - "columns": ["cid"], - "type": "index" - }, - { - "name": "idx_uid", - "columns": ["uid"], - "type": "index" - }, - { - "name": "idx_role", - "columns": ["role"], - "type": "index" - }, - { - "name": "idx_assistant_id", - "columns": ["assistant_id"], - "type": "index" - }, - { - "name": "idx_silent", - "columns": ["silent"], - "type": "index" - }, - { - "name": "idx_expired_at", - "columns": ["expired_at"], - "type": "index" - } - ], + "indexes": [], "option": { "timestamps": true, "soft_deletes": false } } diff --git a/yao/models/kb.mod.yao b/yao/models/kb.mod.yao index 0d466a1c..5415eb93 100644 --- a/yao/models/kb.mod.yao +++ b/yao/models/kb.mod.yao @@ -106,47 +106,6 @@ } ], "relations": {}, - "indexes": [ - { - "name": "idx_collection_id", - "columns": ["collection_id"], - "type": "unique" - }, - { - "name": "idx_name", - "columns": ["name"], - "type": "index" - }, - { - "name": "idx_description", - "columns": ["description"], - "type": "index" - }, - { - "name": "idx_uid", - "columns": ["uid"], - "type": "index" - }, - { - "name": "idx_public", - "columns": ["public"], - "type": "index" - }, - { - "name": "idx_readonly", - "columns": ["readonly"], - "type": "index" - }, - { - "name": "idx_system", - "columns": ["system"], - "type": "index" - }, - { - "name": "idx_sort", - "columns": ["sort"], - "type": "index" - } - ], + "indexes": [], "option": { "timestamps": true, "soft_deletes": false } }