yunzer_go/server/database/sys_feedback.sql
2025-11-13 11:28:00 +08:00

20 lines
1.5 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.

-- 反馈表sys_feedback修复TEXT字段默认值错误
CREATE TABLE `sys_feedback` (
`id` varchar(36) NOT NULL COMMENT 'ID',
`tenant_id` varchar(64) NOT NULL COMMENT '租户ID',
`feedback_name` varchar(50) DEFAULT '' COMMENT '反馈人姓名',
`module` varchar(30) NOT NULL COMMENT '反馈对应模块',
`feedback_type` varchar(20) NOT NULL COMMENT '反馈类型',
`content` text NOT NULL COMMENT '反馈详细内容',
`attachment_url` varchar(255) DEFAULT '' COMMENT '附件URL',
`handle_status` varchar(20) NOT NULL DEFAULT '0' COMMENT '处理状态0-待处理/1-处理中/2-已解决/3-已驳回/4-无需处理)',
`handle_remark` text COMMENT '处理备注移除默认值TEXT类型不支持',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`delete_time` datetime DEFAULT NULL COMMENT '删除时间',
PRIMARY KEY (`id`),
KEY `idx_tenant_id` (`tenant_id`) COMMENT '租户ID索引优化租户级查询',
KEY `idx_module` (`module`) COMMENT '模块索引,优化模块级反馈统计',
KEY `idx_handle_status` (`handle_status`) COMMENT '处理状态索引,优化待处理反馈查询',
KEY `idx_create_time` (`create_time`) COMMENT '创建时间索引,优化时间范围查询'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='通用反馈表(支持租户隔离、软删除)';