123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- -- MySQL dump 10.13 Distrib 8.0.28, for macos11 (x86_64)
- --
- -- Host: 127.0.0.1 Database: libra_bot
- -- ------------------------------------------------------
- -- Server version 8.0.28
- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
- /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
- /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
- /*!50503 SET NAMES utf8mb4 */;
- /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
- /*!40103 SET TIME_ZONE='+00:00' */;
- /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
- /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
- /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
- /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
- --
- -- Table structure for table `c_agent`
- --
- DROP TABLE IF EXISTS `c_agent`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `c_agent` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
- `saas_id` varchar(16) NOT NULL DEFAULT '' COMMENT '租户隔离',
- `agent_num` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席工号',
- `agent_name` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席姓名',
- `out_id` varchar(32) NOT NULL DEFAULT '' COMMENT '外部id',
- `agent_pwd` varchar(64) NOT NULL DEFAULT '' COMMENT '坐席密码',
- `agent_type` tinyint NOT NULL DEFAULT '0' COMMENT '坐席类型 0:普通坐席 ;1:组长:2:主管',
- `phone_num` varchar(32) NOT NULL DEFAULT '0' COMMENT '分机号',
- `distribute` tinyint NOT NULL DEFAULT '1' COMMENT '分配标志 0:不参与排队;1:参与排队',
- `agent_state` tinyint NOT NULL DEFAULT '0' COMMENT '账号状态 0:可用;1:禁用',
- `identity_type` tinyint NOT NULL DEFAULT '0' COMMENT '身份标识',
- `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '删除标识',
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `uniq_vcc_id_agent_num` (`saas_id`,`agent_num`),
- KEY `idx_vcc_id_out_id` (`saas_id`,`out_id`),
- KEY `idx_vcc_id_phone_num` (`saas_id`,`phone_num`)
- ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='坐席信息表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `c_agent`
- --
- LOCK TABLES `c_agent` WRITE;
- /*!40000 ALTER TABLE `c_agent` DISABLE KEYS */;
- INSERT INTO `c_agent` VALUES (1,'mdj','1000','user0','1000','123456',0,'1000',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:46:31'),(3,'mdj','1001','user1','1001','123456',0,'1001',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:49:10'),(4,'mdj','1002','user2','1002','123456',0,'1002',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:49:10'),(5,'mdj','1003','user3','1003','123456',0,'1003',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:49:10'),(6,'mdj','1004','user4','1004','123456',0,'1004',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:49:10'),(7,'mdj','1005','user5','1005','123456',0,'1005',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:49:10'),(8,'mdj','1006','user6','1006','123456',0,'1006',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:49:10'),(9,'mdj','1007','user7','1007','123456',0,'1007',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:49:10'),(10,'mdj','1008','user8','1008','123456',0,'1008',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:49:10'),(11,'mdj','1009','user9','1009','123456',0,'1009',1,0,0,0,'2024-10-08 08:50:08','2024-10-08 08:49:10');
- /*!40000 ALTER TABLE `c_agent` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `c_agent_action_log`
- --
- DROP TABLE IF EXISTS `c_agent_action_log`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `c_agent_action_log` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
- `saas_id` varchar(16) NOT NULL DEFAULT '' COMMENT '租户隔离',
- `agent_num` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席工号',
- `out_id` varchar(32) NOT NULL DEFAULT '' COMMENT '外部id',
- `action_type` tinyint NOT NULL DEFAULT '0' COMMENT '行为类型',
- `check_state` tinyint NOT NULL DEFAULT '-1' COMMENT '签入或签出',
- `pre_check_state` tinyint NOT NULL DEFAULT '-1' COMMENT '签入或签出',
- `service_state` tinyint NOT NULL DEFAULT '-1' COMMENT '坐席状态',
- `pre_service_state` tinyint NOT NULL DEFAULT '-1' COMMENT '坐席状态',
- `check_state_time` timestamp NOT NULL DEFAULT '1999-12-31 16:00:00' COMMENT '签入或签出时间',
- `pre_check_state_time` timestamp NOT NULL DEFAULT '1999-12-31 16:00:00' COMMENT '上一次签入或签出时间',
- `service_state_time` timestamp NOT NULL DEFAULT '1999-12-31 16:00:00' COMMENT '坐席状态变更时间',
- `pre_service_state_time` timestamp NOT NULL DEFAULT '1999-12-31 16:00:00' COMMENT '上一次坐席状态变更时间',
- `check_state_duration` bigint NOT NULL DEFAULT '0' COMMENT '行为持续时间',
- `service_state_duration` bigint NOT NULL DEFAULT '0' COMMENT '状态持续时间',
- `task_id` varchar(32) NOT NULL DEFAULT '' COMMENT '任务Id',
- `service_id` varchar(32) NOT NULL DEFAULT '' COMMENT '人工组id',
- `event_type` int NOT NULL DEFAULT '0' COMMENT '日志事件类型',
- `event_desc` varchar(100) NOT NULL DEFAULT '' COMMENT '日志事件描述',
- `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '删除标识',
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`id`),
- KEY `idx_create_time` (`create_time`),
- KEY `idx_update_time` (`update_time`),
- KEY `idx_saas_id_agent_num` (`saas_id`,`agent_num`),
- KEY `idx_saas_id_out_id` (`saas_id`,`out_id`),
- KEY `idx_saas_id_task_id` (`saas_id`,`task_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='坐席行为日志表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `c_agent_action_log`
- --
- LOCK TABLES `c_agent_action_log` WRITE;
- /*!40000 ALTER TABLE `c_agent_action_log` DISABLE KEYS */;
- /*!40000 ALTER TABLE `c_agent_action_log` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `c_agent_log`
- --
- DROP TABLE IF EXISTS `c_agent_log`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `c_agent_log` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
- `saas_id` varchar(16) NOT NULL DEFAULT '' COMMENT '租户隔离',
- `flow_id` varchar(64) NOT NULL DEFAULT '' COMMENT '人工外呼流程ID',
- `agent_num` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席工号',
- `out_id` varchar(32) NOT NULL DEFAULT '' COMMENT '外部id',
- `event_type` tinyint NOT NULL DEFAULT '0' COMMENT '事件类型',
- `event` varchar(32) NOT NULL DEFAULT '0' COMMENT '事件',
- `content` varchar(64) NOT NULL DEFAULT '' COMMENT '描述',
- `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '删除标识',
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`id`),
- KEY `idx_saas_id_agent_num` (`saas_id`,`agent_num`),
- KEY `idx_saas_id_out_id` (`saas_id`,`out_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='坐席日志表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `c_agent_log`
- --
- LOCK TABLES `c_agent_log` WRITE;
- /*!40000 ALTER TABLE `c_agent_log` DISABLE KEYS */;
- /*!40000 ALTER TABLE `c_agent_log` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `c_agent_monitor`
- --
- DROP TABLE IF EXISTS `c_agent_monitor`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `c_agent_monitor` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
- `saas_id` varchar(16) NOT NULL DEFAULT '' COMMENT '租户隔离',
- `agent_num` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席工号',
- `out_id` varchar(32) NOT NULL DEFAULT '' COMMENT '外部id',
- `identity_type` tinyint NOT NULL DEFAULT '0' COMMENT '身份标识',
- `check_state` tinyint NOT NULL DEFAULT '1' COMMENT '是否签入 0:是 1: 否 默认未签入',
- `check_scene` varchar(16) NOT NULL DEFAULT '' COMMENT '迁入场景',
- `check_in_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '签入时间',
- `check_out_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '签出时间',
- `service_state` tinyint NOT NULL DEFAULT '0' COMMENT '坐席服务状态 0: 未登录(签出) 1: 置忙 2: 置闲 3: 通话中 4: 后处理 5: 拨号中',
- `busy_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '置忙时间',
- `idle_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '置闲时间',
- `call_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '接通时间',
- `hang_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '挂断时间',
- `heart_state` tinyint NOT NULL DEFAULT '0' COMMENT '心跳状态 0: 默认 1:正常 2: 异常',
- `heart_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '正常心跳时间',
- `session_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'sessionId',
- `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '删除标识',
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- PRIMARY KEY (`id`),
- UNIQUE KEY `uniq_saas_id_agent_num` (`saas_id`,`agent_num`),
- KEY `idx_saas_id_out_id` (`saas_id`,`out_id`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='坐席监控表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `c_agent_monitor`
- --
- LOCK TABLES `c_agent_monitor` WRITE;
- /*!40000 ALTER TABLE `c_agent_monitor` DISABLE KEYS */;
- /*!40000 ALTER TABLE `c_agent_monitor` ENABLE KEYS */;
- UNLOCK TABLES;
- --
- -- Table structure for table `c_phone`
- --
- DROP TABLE IF EXISTS `c_phone`;
- /*!40101 SET @saved_cs_client = @@character_set_client */;
- /*!50503 SET character_set_client = utf8mb4 */;
- CREATE TABLE `c_phone` (
- `id` bigint unsigned NOT NULL AUTO_INCREMENT,
- `saas_id` varchar(16) NOT NULL DEFAULT '',
- `phone_num` varchar(32) NOT NULL DEFAULT '0',
- `phone_pwd` varchar(32) NOT NULL DEFAULT '',
- `sip_server` varchar(64) NOT NULL DEFAULT '',
- `wss_server` varchar(64) NOT NULL DEFAULT '',
- `ice_server` varchar(64) NOT NULL DEFAULT '',
- `is_delete` tinyint NOT NULL DEFAULT '0',
- `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`id`),
- KEY `idx_vcc_id_phone_num` (`saas_id`,`phone_num`)
- ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='分机信息表';
- /*!40101 SET character_set_client = @saved_cs_client */;
- --
- -- Dumping data for table `c_phone`
- --
- LOCK TABLES `c_phone` WRITE;
- /*!40000 ALTER TABLE `c_phone` DISABLE KEYS */;
- INSERT INTO `c_phone` VALUES (1,'mdj','1000','slibra@#123456','sip:1000@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56'),(2,'mdj','1001','slibra@#123456','sip:1001@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56'),(3,'mdj','1002','slibra@#123456','sip:1002@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56'),(4,'mdj','1003','slibra@#123456','sip:1003@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56'),(5,'mdj','1004','slibra@#123456','sip:1004@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56'),(6,'mdj','1005','slibra@#123456','sip:1005@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56'),(7,'mdj','1006','slibra@#123456','sip:1006@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56'),(8,'mdj','1007','slibra@#123456','sip:1007@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56'),(9,'mdj','1008','slibra@#123456','sip:1008@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56'),(10,'mdj','1009','slibra@#123456','sip:1009@pbx.fuxicarbon.com:5060','wss://pbx.fuxicarbon.com:7443','stun:pbx.fuxicarbon.com:3478',1,'2024-10-08 08:43:56','2024-10-08 08:43:56');
- /*!40000 ALTER TABLE `c_phone` ENABLE KEYS */;
- UNLOCK TABLES;
- /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
- /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
- /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
- /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
- /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
- /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
- /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
- /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
- -- Dump completed on 2024-10-26 17:20:05
|