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

DROP TABLE IF EXISTS `ai_material`;
CREATE TABLE `ai_material` (
    PRIMARY KEY (`id`),
    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
    `user_id` BIGINT NOT NULL COMMENT '上传用户ID',
    `category_id` BIGINT NOT NULL COMMENT '素材分类ID',
    `tag_ids` VARCHAR(255) COMMENT '素材标签ID(多个以逗号间隔)',
    `material_name` VARCHAR(100) NOT NULL COMMENT '素材名称',
    `image_thumb_url` VARCHAR(1000) COMMENT '缩略图',
    `image_url` VARCHAR(1000) COMMENT '高清图',
    `file_url` VARCHAR(1000) COMMENT '文件地址',
    `pan_baidu_url` VARCHAR(1000) COMMENT '百度网盘地址',
    `is_copyright` TINYINT DEFAULT '-1' COMMENT '是否有版权 (-1否, 1是)',
    `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    INDEX `idx_user_id` (`user_id`),
    INDEX `idx_category_id` (`category_id`),
    INDEX `idx_tag_ids` (`tag_ids`),
    INDEX `idx_material_name` (`material_name`)
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='素材表';

INSERT INTO ai_material(user_id, category_id, tag_ids, material_name, image_thumb_url, image_url, file_url, is_copyright, create_time) VALUES
    (1, 2, '6', '御姐魔女-1', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:01'),
    (1, 2, '6', '御姐魔女-2', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:02'),
    (1, 2, '6', '御姐魔女-3', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:03'),
    (1, 2, '6', '御姐魔女-4', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:04'),
    (1, 2, '6', '御姐魔女-5', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:05'),
    (1, 2, '6', '御姐魔女-6', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:06'),
    (1, 2, '6', '御姐魔女-7', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:07'),
    (1, 2, '6', '御姐魔女-8', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:08'),
    (1, 2, '6', '御姐魔女-9', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:09'),
    (1, 2, '6', '御姐魔女-10', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:10'),
    (1, 2, '6', '御姐魔女-11', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.png', 'https://www.xxx.com/xx.fla', 1, '2025-07-28 08:30:11'),
    (1, 2, '6', '竹屋内', 'https://cos.daogu.ai/temp/d2361395-6e39-4a01-8c3b-1c79095f4391.png?imageMogr2/thumbnail/315x180/pad/1/color/I2Y4ZjhmOA==', 'https://cos.daogu.ai/temp/d2361395-6e39-4a01-8c3b-1c79095f4391.png', 'https://cos.daogu.ai/temp/2d0e951d-d894-4f88-8904-bf9f1d4797f5.fla', 1, '2025-07-30 08:30:00')
;

