/*
 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: 29/09/2025 16:29:16
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for topsales_score_result
-- ----------------------------
DROP TABLE IF EXISTS `topsales_score_result`;
CREATE TABLE `topsales_score_result`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'primary key, UUID',
  `workflow_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Dify workflow id',
  `naturalness_score` int NOT NULL DEFAULT 0 COMMENT '自然度分数',
  `coherence_score` int NOT NULL DEFAULT 0 COMMENT '连贯性分数',
  `fluency_score` int NOT NULL DEFAULT 0 COMMENT '流畅度分数',
  `advisor_aggressiveness_score` int NOT NULL DEFAULT 0 COMMENT '顾问攻击性分数（高=低攻击性）',
  `advisor_consistency_score` int NOT NULL DEFAULT 0 COMMENT '顾问一致性分数',
  `greeting_reception_score` int NOT NULL DEFAULT 0 COMMENT '欢迎接待分数',
  `brand_introduction_score` int NOT NULL DEFAULT 0 COMMENT '品牌介绍分数',
  `customer_needs_understanding_score` int NOT NULL DEFAULT 0 COMMENT '了解客户用车需求分数',
  `budget_understanding_score` int NOT NULL DEFAULT 0 COMMENT '了解客户经济预算分数',
  `recommendation_score` int NOT NULL DEFAULT 0 COMMENT '推荐配置或车型分数',
  `safety_introduction_score` int NOT NULL DEFAULT 0 COMMENT '重点介绍安全性分数',
  `health_environment_introduction_score` int NOT NULL DEFAULT 0 COMMENT '重点介绍健康环保分数',
  `technology_introduction_score` int NOT NULL DEFAULT 0 COMMENT '重点介绍科技性分数',
  `test_drive_invitation_score` int NOT NULL DEFAULT 0 COMMENT '邀请试驾分数',
  `negotiation_deal_score` int NOT NULL DEFAULT 0 COMMENT '商谈成交分数',
  `src_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '待分析内容',
  `src_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '原内容ID',
  `src_desc` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '来源说明',
  `total_tokens` int NULL DEFAULT NULL COMMENT 'total tokens',
  `elapsed_time` decimal(10, 2) NULL DEFAULT NULL COMMENT 'elapsed seconds',
  `status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'run status',
  `error` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT 'error message',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'created at',
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'updated at',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_workflow_id`(`workflow_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'TopSales all-dimensions scoring result' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
