Files
ruoyi-vue-pro/sql/mysql/ydoyun_ai_assistant_report_detail.sql
2026-04-01 08:59:58 +08:00

20 lines
1.2 KiB
SQL
Raw Permalink 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.

-- 每日汇报详表:与 ydoyun_ai_assistant_report 一对多
CREATE TABLE IF NOT EXISTS `ydoyun_ai_assistant_report_detail` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`report_id` bigint NOT NULL COMMENT '每日汇报主表IDydoyun_ai_assistant_report.id',
`diagnosis_item` varchar(256) NOT NULL DEFAULT '' COMMENT '诊断项目',
`value1` varchar(512) DEFAULT '' COMMENT '指标异常',
`value2` varchar(512) DEFAULT '' COMMENT '归因分析',
`value3` varchar(512) DEFAULT '' COMMENT '改善对策',
`sort_order` int NOT NULL DEFAULT 0 COMMENT '排序',
`creator` varchar(64) DEFAULT '' NULL COMMENT '创建者',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
`updater` varchar(64) DEFAULT '' NULL COMMENT '更新者',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) DEFAULT b'0' NOT NULL COMMENT '是否删除',
`tenant_id` bigint DEFAULT 0 NOT NULL COMMENT '租户编号',
PRIMARY KEY (`id`),
KEY `idx_report_id` (`report_id`),
KEY `idx_tenant_id` (`tenant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='AI决策助手每日汇报详表';