Files
hudi-service/service-ai/database/20250702.sql

83 lines
4.2 KiB
SQL
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.
create table hudi_collect_build_b12.service_ai_feedback
(
id bigint not null comment '记录唯一标记',
created_time datetime(6) comment '记录创建时间',
modified_time datetime(6) comment '记录更新时间',
analysis longtext comment 'AI的分析结果',
conclusion longtext comment 'AI的解决方案',
source longtext not null comment '原始报障说明',
status enum ('ANALYSIS_PROCESSING','ANALYSIS_SUCCESS','FINISHED') not null comment '报障处理状态',
primary key (id)
) comment ='报障信息记录' charset = utf8mb4;
create table hudi_collect_build_b12.service_ai_feedback_pictures
(
feedback_id bigint not null,
pictures_id bigint not null,
primary key (feedback_id, pictures_id)
) comment ='报障相关截图' charset = utf8mb4;
alter table hudi_collect_build_b12.service_ai_feedback_pictures
add constraint UK3npjcyjyqfbdlf2v5tj64j2g3 unique (pictures_id);
create table hudi_collect_build_b12.service_ai_file
(
id bigint not null comment '记录唯一标记',
created_time datetime(6) comment '记录创建时间',
modified_time datetime(6) comment '记录更新时间',
filename varchar(255) comment '文件名称',
md5 varchar(255) comment '文件的md5编码用于校验文件的完整性',
path varchar(255) comment '文件在主机上存储的实际路径',
size bigint comment '文件大小单位是byte',
type varchar(255) comment '文件类型,通常记录的是文件的后缀名',
primary key (id)
) comment ='记录上传的文件存储信息' charset = utf8mb4;
create table hudi_collect_build_b12.service_ai_flow_task
(
id bigint not null comment '记录唯一标记',
created_time datetime(6) comment '记录创建时间',
modified_time datetime(6) comment '记录更新时间',
error longtext comment '任务运行产生的报错',
input longtext comment '任务输入',
result longtext comment '任务运行结果',
status enum ('ERROR','FINISHED','RUNNING') not null comment '任务运行状态',
template_id bigint not null comment '流程任务对应的模板',
primary key (id)
) comment ='流程任务记录' charset = utf8mb4;
create table hudi_collect_build_b12.service_ai_flow_task_template
(
id bigint not null comment '记录唯一标记',
created_time datetime(6) comment '记录创建时间',
modified_time datetime(6) comment '记录更新时间',
description varchar(255) comment '模板功能、内容说明',
flow_graph longtext not null comment '前端流程图数据',
input_schema longtext not null comment '模板入参Schema',
name varchar(255) not null comment '模板名称',
primary key (id)
) comment ='流程任务模板' charset = utf8mb4;
create table hudi_collect_build_b12.service_ai_group
(
id bigint not null comment '记录唯一标记',
created_time datetime(6) comment '记录创建时间',
modified_time datetime(6) comment '记录更新时间',
name varchar(255) not null comment '分组名称',
status enum ('FINISHED','RUNNING') not null comment '分组处理状态',
knowledge_id bigint not null,
primary key (id)
) comment ='知识库下包含的分组' charset = utf8mb4;
create table hudi_collect_build_b12.service_ai_knowledge
(
id bigint not null comment '记录唯一标记',
created_time datetime(6) comment '记录创建时间',
modified_time datetime(6) comment '记录更新时间',
description longtext not null comment '知识库说明',
name varchar(255) not null comment '知识库名称',
strategy enum ('Cosine','Euclid') not null comment '知识库策略',
vector_source_id bigint not null comment '知识库对应的向量库名',
primary key (id)
) comment ='知识库' charset = utf8mb4;