调整 ai模块

This commit is contained in:
2025-10-15 09:27:51 +08:00
parent 5a45668c61
commit 89c233ca9f
4 changed files with 60 additions and 38 deletions

View File

@@ -75,29 +75,39 @@ CREATE TABLE `tz_ai_sample_tag_group_relate`
DROP TABLE IF EXISTS `tz_ai_dialog`;
CREATE TABLE `tz_ai_dialog`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`title` varchar(128) NULL DEFAULT '' COMMENT '对话标题',
`user_id` bigint NOT NULL COMMENT '用户id',
`dialog_status` int(8) NULL COMMENT '对话状态1active, 2archived, 3deleted',
`creator` varchar(64) NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`title` varchar(128) DEFAULT '' COMMENT '对话标题',
`user_id` bigint NOT NULL COMMENT '用户id',
`dialog_status` int DEFAULT NULL COMMENT '对话状态1active, 2archived, 3deleted',
`creator` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
`tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB COMMENT = 'ai-对话表';
) ENGINE = InnoDB COMMENT ='ai-对话表';
DROP TABLE IF EXISTS `tz_ai_dialog_message`;
CREATE TABLE `tz_ai_dialog_message`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`dialog_id` bigint NOT NULL COMMENT '对话id',
`content_text` varchar(64) NULL DEFAULT '' COMMENT '内容',
`content_type` int(8) NULL COMMENT '文本类型1text2image3file4audio',
`message_order` int(8) NULL COMMENT '对话中的顺序',
`message_status` int(8) NULL COMMENT '消息状态 1正常 0删除',
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
`dialog_id` bigint NOT NULL COMMENT '对话id',
`content_text` text COMMENT '内容',
`content_type` int DEFAULT NULL COMMENT '文本类型1text2file',
`message_order` int DEFAULT NULL COMMENT '对话中的顺序',
`message_status` int DEFAULT NULL COMMENT '消息状态 1正常 0删除',
`pet_id` bigint DEFAULT NULL COMMENT '宠物id',
`pet_name` varchar(255) DEFAULT NULL COMMENT '宠物名称',
`pet_avatar` varchar(255) DEFAULT NULL COMMENT '宠物头像',
`pet_type` varchar(64) DEFAULT NULL COMMENT '宠物类型',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`trans_result` text COMMENT '回答结果',
`content_duration` bigint DEFAULT NULL COMMENT '文件时长',
`trans_status` int DEFAULT NULL COMMENT '翻译状态1成功 0失败',
`source_result` text COMMENT '原始结果',
`file_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB COMMENT = 'ai-对话消息表';
) ENGINE = InnoDB COMMENT ='ai-对话消息表';