/*
 Navicat Premium Data Transfer

 Source Server         : omc@192.168.2.223-psap
 Source Server Type    : MariaDB
 Source Server Version : 100622 (10.6.22-MariaDB-0ubuntu0.22.04.1)
 Source Host           : 192.168.2.223:33066
 Source Schema         : omc_db

 Target Server Type    : MariaDB
 Target Server Version : 100622 (10.6.22-MariaDB-0ubuntu0.22.04.1)
 File Encoding         : 65001

 Date: 16/06/2025 11:52:26
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for mf_callback_ticket
-- ----------------------------
DROP TABLE IF EXISTS `mf_callback_ticket`;
CREATE TABLE `mf_callback_ticket`  (
  `ticket_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Ticket ID',
  `caller_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT 'caller number',
  `callee_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'callee number',
  `status` enum('NEW','IN_PROGRESS','NO_ANSWER_1','NO_ANSWER_2','TIMEOUT','PENDING','CLOSED') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'NEW' COMMENT '1:NEW/新建,2:IN_PROGRESS/处理中,3:NO_ANSWER_1/未应答1,3:NO_ANSWER_2/未应答2,4:TIMEOUT/超时,5:PENDING/挂起,6:CLOSED/关闭',
  `agent_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'agent name',
  `comment` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'comment for callback',
  `msd_data` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT 'MSD data',
  `rm_uid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'MF Resource UID',
  `created_at` bigint(20) NULL DEFAULT NULL COMMENT 'created at time',
  `updated_at` bigint(20) NULL DEFAULT NULL COMMENT 'updated at time',
  PRIMARY KEY (`ticket_id`) USING BTREE,
  INDEX `idx_caller_agent`(`caller_number`, `agent_name`) USING BTREE,
  INDEX `idx_created`(`created_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 108 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
