/**
Source Server Version: 8.0.31
Source Database: backendsys
Date: 2025/07/28 15:57:12
*/

DROP TABLE IF EXISTS `ai_material_feedback`;
CREATE TABLE `ai_material_feedback` (
    PRIMARY KEY (`id`),
    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
    `user_id` BIGINT NOT NULL COMMENT '用户ID',
    `lora_id` BIGINT NOT NULL COMMENT '素材风格ID',
    `category_id` BIGINT NOT NULL COMMENT '素材分类ID',
    `content` VARCHAR(2000) NOT NULL COMMENT '需求说明 (500字以内)',
    `image_url` VARCHAR(2000) COMMENT '参考图',
    `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    INDEX `user_id` (`user_id`),
    INDEX `idx_lora_id` (`lora_id`),
    INDEX `category_id` (`category_id`)
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='素材需求反馈表';

INSERT INTO ai_material_feedback(user_id, lora_id, category_id, content, image_url) VALUES
    (1, 2, 2, '这是一段反馈和建议的文字', 'https://www.xxx.com/xx.png'),
    (1, 2, 2, '这是一段反馈和建议的文字 (无图)', '')
;

