/**
Source Server Version: 8.0.31
Source Database: backendsys
Date: 2023/05/23 17:09:22
*/

DROP TABLE IF EXISTS `ai_ivh_quota_history`;

CREATE TABLE `ai_ivh_quota_history` (
    PRIMARY KEY (`id`),
    `id` BIGINT(10) AUTO_INCREMENT COMMENT 'ID',
    `user_id` BIGINT(10) NOT NULL COMMENT '用户ID',
    `activity_type` VARCHAR(255) NOT NULL COMMENT '触发类型 (枚举值) (定制数字人/定制声音复刻)',
    `activity_type_description` VARCHAR(255) NOT NULL COMMENT '触发类型描述',
    `quota_type` VARCHAR(255) NOT NULL COMMENT '配额类型 (Anchor|Timbre)',
    `quota_adjustment` INT NOT NULL COMMENT '配额变动 (增加|减少) (正|负)',
    `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='AI数智人-用户配额操作记录表';
