From 95ae0c83d2aa58d86b4039e3f7f16ee93afb8f00 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 23 十月 2026 17:01:00 +0800
Subject: [PATCH] feat(ai): 完善模型管理和智能体导入功能

---
 sql/mysql/agent_import_command_20261022.sql |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/sql/mysql/agent_import_command_20261022.sql b/sql/mysql/agent_import_command_20261022.sql
index 18b392e..852764f 100644
--- a/sql/mysql/agent_import_command_20261022.sql
+++ b/sql/mysql/agent_import_command_20261022.sql
@@ -5,7 +5,6 @@
   `idempotency_key` varchar(128) NOT NULL COMMENT '骞傜瓑閿�',
   `request_digest` char(64) NOT NULL COMMENT '璇锋眰鎽樿 SHA-256',
   `module_id` varchar(64) NOT NULL COMMENT '涓氬姟妯″潡 ID锛屽 srm.supplier',
-  `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '绉熸埛 ID',
   `owner_user_id` bigint NOT NULL COMMENT '鎻愪氦鐢ㄦ埛 ID',
   `session_id` bigint DEFAULT NULL COMMENT '琛ュ綍浼氳瘽 ID',
   `attachment_id` bigint NOT NULL COMMENT '闄勪欢 ID',
@@ -26,9 +25,9 @@
   `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
   `deleted` bit(1) NOT NULL DEFAULT b'0',
   PRIMARY KEY (`id`),
-  UNIQUE KEY `uk_agent_import_generic_command` (`tenant_id`, `owner_user_id`, `module_id`, `command_id`),
-  UNIQUE KEY `uk_agent_import_generic_idempotency` (`tenant_id`, `owner_user_id`, `module_id`, `idempotency_key`),
-  KEY `idx_agent_import_generic_module` (`tenant_id`, `module_id`, `create_time`)
+  UNIQUE KEY `uk_agent_import_generic_command` (`owner_user_id`, `module_id`, `command_id`),
+  UNIQUE KEY `uk_agent_import_generic_idempotency` (`owner_user_id`, `module_id`, `idempotency_key`),
+  KEY `idx_agent_import_generic_module` (`module_id`, `create_time`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='鏅鸿兘浣撻�氱敤涓氬姟瀵煎叆鍛戒护';
 
 CREATE TABLE IF NOT EXISTS `agent_import_command_row` (

--
Gitblit v1.9.3