Files
smartDriveEE/src/main/sql/tts_request_log.sql
2025-10-04 19:52:06 +08:00

33 lines
1.8 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.

-- TTS请求日志表
CREATE TABLE IF NOT EXISTS `tts_request_log` (
`id` varchar(64) NOT NULL COMMENT '主键ID',
`request_time` datetime NOT NULL COMMENT '请求时间',
`model` varchar(100) DEFAULT NULL COMMENT '模型名称',
`input_text` text COMMENT '输入文本',
`input_length` int DEFAULT NULL COMMENT '输入文本长度',
`voice` varchar(100) DEFAULT NULL COMMENT '语音参数',
`speed` double DEFAULT NULL COMMENT '语速',
`pitch` double DEFAULT NULL COMMENT '音调',
`volume` double DEFAULT NULL COMMENT '音量',
`format` varchar(50) DEFAULT NULL COMMENT '输出格式',
`sample_rate` int DEFAULT NULL COMMENT '采样率',
`status` varchar(20) NOT NULL COMMENT '请求状态SUCCESS/FAILED',
`audio_size_bytes` bigint DEFAULT NULL COMMENT '音频文件大小(字节)',
`duration` double DEFAULT NULL COMMENT '音频时长(秒)',
`minio_url` varchar(500) DEFAULT NULL COMMENT 'MinIO文件URL',
`short_url` varchar(500) DEFAULT NULL COMMENT '短链临时访问URL',
`short_url_expire_time` datetime DEFAULT NULL COMMENT '短链过期时间',
`error_message` text COMMENT '错误信息',
`error_code` varchar(50) DEFAULT NULL COMMENT '错误代码',
`processing_time_ms` bigint DEFAULT NULL COMMENT '处理时间(毫秒)',
`creator_name` varchar(100) DEFAULT NULL COMMENT '创建人姓名',
`creator_phone` varchar(20) DEFAULT NULL COMMENT '创建人电话',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_request_time` (`request_time`),
KEY `idx_status` (`status`),
KEY `idx_model` (`model`),
KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='TTS请求日志表';