Files
ai_wht_wechat/go_backend/migrations/create_feedback_table.sql
2026-01-06 19:36:42 +08:00

17 lines
1.1 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.

-- 创建意见反馈表
CREATE TABLE IF NOT EXISTS ai_feedback (
id BIGINT AUTO_INCREMENT PRIMARY KEY COMMENT '主键ID',
feedback_type ENUM('功能建议', 'Bug反馈', '体验问题', '其他') NOT NULL COMMENT '反馈类型',
description TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '问题描述最多500字',
contact_info VARCHAR(255) DEFAULT NULL COMMENT '联系方式(如邮箱),选填',
nickname VARCHAR(255) NOT NULL DEFAULT '' COMMENT '填写用户昵称',
created_user_id INT(10) UNSIGNED NOT NULL COMMENT '创建该反馈的用户ID关联用户表',
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
status ENUM('待处理', '处理中', '已解决', '已关闭') DEFAULT '待处理' COMMENT '反馈状态',
INDEX idx_created_user_id (created_user_id),
INDEX idx_feedback_type (feedback_type),
INDEX idx_created_at (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='AI系统用户反馈表';