/*
 Navicat Premium Data Transfer

 Source Server         : 媒体经纪人-测试
 Source Server Type    : MySQL
 Source Server Version : 80042
 Source Host           : 124.221.59.58:3309
 Source Schema         : ai_smart_badge

 Target Server Type    : MySQL
 Target Server Version : 80042
 File Encoding         : 65001

 Date: 10/09/2025 20:43:49
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for audio_management
-- ----------------------------
DROP TABLE IF EXISTS `audio_management`;
CREATE TABLE `audio_management`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键，UUID',
  `recording_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '录音名称',
  `recording_time` datetime NULL DEFAULT NULL COMMENT '录音时间',
  `info_card_description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '信息卡',
  `sales_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属销售ID',
  `sales_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属销售名称',
  `sales_phone` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '销售人员电话',
  `duration` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '录音时长(分钟)',
  `customer_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户ID',
  `customer_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户姓名',
  `customer_phone` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户手机号',
  `upload_time` datetime NULL DEFAULT NULL COMMENT '上传时间',
  `intention_level` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '意向级别（高意向， 中意向  , 低意向）',
  `dealership_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属门店ID',
  `dealership_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属门店名称',
  `project_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属项目ID',
  `project_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属项目名称',
  `script_model` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '话术模型',
  `upload_status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上传状态',
  `sync_status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '同步状态',
  `is_merged` tinyint(1) NULL DEFAULT 0 COMMENT '是否合并(0否1是)',
  `remarks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '录音备注',
  `recording_text` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '录音文本内容',
  `company_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '公司类型',
  `edit_status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编辑状态',
  `edit_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
  `info_card_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '信息卡类型（如意向车型、购买情况、来访目的、试驾结果、付款方式、试驾专员等）',
  `info_card_value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '信息卡内容',
  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `audio_file_path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '音频文件路径',
  `audio_file_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '音频文件访问URL',
  `audio_file_size` bigint NULL DEFAULT NULL COMMENT '音频文件大小(字节)',
  `audio_file_original_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '音频文件原始名称',
  `audio_file_extension` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '音频文件扩展名',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_audio_file_url`(`audio_file_url`) USING BTREE COMMENT '音频文件URL索引'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '录音管理表，含信息卡字段' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of audio_management
-- 请生成为这个表：audio_management插入300条数据的sql脚本，表结构参考： audio_management.sql  ，限制1： 所属项目ID和所属项目名称 ，取值范围 在 project_management.sql 的146行之后的信息范围 ， 限定2：所属门店ID和所属门店名称，限定在dealership.sql的76行 ，限定3：所属销售ID和 所属销售名称，限定范围在sales_management.sql的 355行之后， 限定4： 保证这几种ID在生成的脚本里分布
-- ----------------------------

SET FOREIGN_KEY_CHECKS = 1;








