_localhost-2024_10_26_17_20_04-dump.sql 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. -- MySQL dump 10.13 Distrib 8.0.28, for macos11 (x86_64)
  2. --
  3. -- Host: 127.0.0.1 Database: libra_bot
  4. -- ------------------------------------------------------
  5. -- Server version 8.0.28
  6. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  7. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  8. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  9. /*!50503 SET NAMES utf8mb4 */;
  10. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  11. /*!40103 SET TIME_ZONE='+00:00' */;
  12. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  13. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  14. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  15. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  16. --
  17. -- Table structure for table `c_agent`
  18. --
  19. DROP TABLE IF EXISTS `c_agent`;
  20. /*!40101 SET @saved_cs_client = @@character_set_client */;
  21. /*!50503 SET character_set_client = utf8mb4 */;
  22. CREATE TABLE `c_agent` (
  23. `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  24. `saas_id` varchar(16) NOT NULL DEFAULT '' COMMENT '租户隔离',
  25. `agent_num` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席工号',
  26. `agent_name` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席姓名',
  27. `out_id` varchar(32) NOT NULL DEFAULT '' COMMENT '外部id',
  28. `agent_pwd` varchar(64) NOT NULL DEFAULT '' COMMENT '坐席密码',
  29. `agent_type` tinyint NOT NULL DEFAULT '0' COMMENT '坐席类型 0:普通坐席 ;1:组长:2:主管',
  30. `phone_num` varchar(32) NOT NULL DEFAULT '0' COMMENT '分机号',
  31. `distribute` tinyint NOT NULL DEFAULT '1' COMMENT '分配标志 0:不参与排队;1:参与排队',
  32. `agent_state` tinyint NOT NULL DEFAULT '0' COMMENT '账号状态 0:可用;1:禁用',
  33. `identity_type` tinyint NOT NULL DEFAULT '0' COMMENT '身份标识',
  34. `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '删除标识',
  35. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  36. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  37. PRIMARY KEY (`id`),
  38. UNIQUE KEY `uniq_vcc_id_agent_num` (`saas_id`,`agent_num`),
  39. KEY `idx_vcc_id_out_id` (`saas_id`,`out_id`),
  40. KEY `idx_vcc_id_phone_num` (`saas_id`,`phone_num`)
  41. ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='坐席信息表';
  42. /*!40101 SET character_set_client = @saved_cs_client */;
  43. --
  44. -- Dumping data for table `c_agent`
  45. --
  46. LOCK TABLES `c_agent` WRITE;
  47. /*!40000 ALTER TABLE `c_agent` DISABLE KEYS */;
  48. 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');
  49. /*!40000 ALTER TABLE `c_agent` ENABLE KEYS */;
  50. UNLOCK TABLES;
  51. --
  52. -- Table structure for table `c_agent_action_log`
  53. --
  54. DROP TABLE IF EXISTS `c_agent_action_log`;
  55. /*!40101 SET @saved_cs_client = @@character_set_client */;
  56. /*!50503 SET character_set_client = utf8mb4 */;
  57. CREATE TABLE `c_agent_action_log` (
  58. `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  59. `saas_id` varchar(16) NOT NULL DEFAULT '' COMMENT '租户隔离',
  60. `agent_num` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席工号',
  61. `out_id` varchar(32) NOT NULL DEFAULT '' COMMENT '外部id',
  62. `action_type` tinyint NOT NULL DEFAULT '0' COMMENT '行为类型',
  63. `check_state` tinyint NOT NULL DEFAULT '-1' COMMENT '签入或签出',
  64. `pre_check_state` tinyint NOT NULL DEFAULT '-1' COMMENT '签入或签出',
  65. `service_state` tinyint NOT NULL DEFAULT '-1' COMMENT '坐席状态',
  66. `pre_service_state` tinyint NOT NULL DEFAULT '-1' COMMENT '坐席状态',
  67. `check_state_time` timestamp NOT NULL DEFAULT '1999-12-31 16:00:00' COMMENT '签入或签出时间',
  68. `pre_check_state_time` timestamp NOT NULL DEFAULT '1999-12-31 16:00:00' COMMENT '上一次签入或签出时间',
  69. `service_state_time` timestamp NOT NULL DEFAULT '1999-12-31 16:00:00' COMMENT '坐席状态变更时间',
  70. `pre_service_state_time` timestamp NOT NULL DEFAULT '1999-12-31 16:00:00' COMMENT '上一次坐席状态变更时间',
  71. `check_state_duration` bigint NOT NULL DEFAULT '0' COMMENT '行为持续时间',
  72. `service_state_duration` bigint NOT NULL DEFAULT '0' COMMENT '状态持续时间',
  73. `task_id` varchar(32) NOT NULL DEFAULT '' COMMENT '任务Id',
  74. `service_id` varchar(32) NOT NULL DEFAULT '' COMMENT '人工组id',
  75. `event_type` int NOT NULL DEFAULT '0' COMMENT '日志事件类型',
  76. `event_desc` varchar(100) NOT NULL DEFAULT '' COMMENT '日志事件描述',
  77. `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '删除标识',
  78. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  79. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  80. PRIMARY KEY (`id`),
  81. KEY `idx_create_time` (`create_time`),
  82. KEY `idx_update_time` (`update_time`),
  83. KEY `idx_saas_id_agent_num` (`saas_id`,`agent_num`),
  84. KEY `idx_saas_id_out_id` (`saas_id`,`out_id`),
  85. KEY `idx_saas_id_task_id` (`saas_id`,`task_id`)
  86. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='坐席行为日志表';
  87. /*!40101 SET character_set_client = @saved_cs_client */;
  88. --
  89. -- Dumping data for table `c_agent_action_log`
  90. --
  91. LOCK TABLES `c_agent_action_log` WRITE;
  92. /*!40000 ALTER TABLE `c_agent_action_log` DISABLE KEYS */;
  93. /*!40000 ALTER TABLE `c_agent_action_log` ENABLE KEYS */;
  94. UNLOCK TABLES;
  95. --
  96. -- Table structure for table `c_agent_log`
  97. --
  98. DROP TABLE IF EXISTS `c_agent_log`;
  99. /*!40101 SET @saved_cs_client = @@character_set_client */;
  100. /*!50503 SET character_set_client = utf8mb4 */;
  101. CREATE TABLE `c_agent_log` (
  102. `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  103. `saas_id` varchar(16) NOT NULL DEFAULT '' COMMENT '租户隔离',
  104. `flow_id` varchar(64) NOT NULL DEFAULT '' COMMENT '人工外呼流程ID',
  105. `agent_num` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席工号',
  106. `out_id` varchar(32) NOT NULL DEFAULT '' COMMENT '外部id',
  107. `event_type` tinyint NOT NULL DEFAULT '0' COMMENT '事件类型',
  108. `event` varchar(32) NOT NULL DEFAULT '0' COMMENT '事件',
  109. `content` varchar(64) NOT NULL DEFAULT '' COMMENT '描述',
  110. `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '删除标识',
  111. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  112. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  113. PRIMARY KEY (`id`),
  114. KEY `idx_saas_id_agent_num` (`saas_id`,`agent_num`),
  115. KEY `idx_saas_id_out_id` (`saas_id`,`out_id`)
  116. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='坐席日志表';
  117. /*!40101 SET character_set_client = @saved_cs_client */;
  118. --
  119. -- Dumping data for table `c_agent_log`
  120. --
  121. LOCK TABLES `c_agent_log` WRITE;
  122. /*!40000 ALTER TABLE `c_agent_log` DISABLE KEYS */;
  123. /*!40000 ALTER TABLE `c_agent_log` ENABLE KEYS */;
  124. UNLOCK TABLES;
  125. --
  126. -- Table structure for table `c_agent_monitor`
  127. --
  128. DROP TABLE IF EXISTS `c_agent_monitor`;
  129. /*!40101 SET @saved_cs_client = @@character_set_client */;
  130. /*!50503 SET character_set_client = utf8mb4 */;
  131. CREATE TABLE `c_agent_monitor` (
  132. `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  133. `saas_id` varchar(16) NOT NULL DEFAULT '' COMMENT '租户隔离',
  134. `agent_num` varchar(32) NOT NULL DEFAULT '' COMMENT '坐席工号',
  135. `out_id` varchar(32) NOT NULL DEFAULT '' COMMENT '外部id',
  136. `identity_type` tinyint NOT NULL DEFAULT '0' COMMENT '身份标识',
  137. `check_state` tinyint NOT NULL DEFAULT '1' COMMENT '是否签入 0:是 1: 否 默认未签入',
  138. `check_scene` varchar(16) NOT NULL DEFAULT '' COMMENT '迁入场景',
  139. `check_in_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '签入时间',
  140. `check_out_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '签出时间',
  141. `service_state` tinyint NOT NULL DEFAULT '0' COMMENT '坐席服务状态 0: 未登录(签出) 1: 置忙 2: 置闲 3: 通话中 4: 后处理 5: 拨号中',
  142. `busy_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '置忙时间',
  143. `idle_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '置闲时间',
  144. `call_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '接通时间',
  145. `hang_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '挂断时间',
  146. `heart_state` tinyint NOT NULL DEFAULT '0' COMMENT '心跳状态 0: 默认 1:正常 2: 异常',
  147. `heart_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '正常心跳时间',
  148. `session_id` varchar(64) NOT NULL DEFAULT '' COMMENT 'sessionId',
  149. `is_delete` tinyint NOT NULL DEFAULT '0' COMMENT '删除标识',
  150. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  151. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  152. PRIMARY KEY (`id`),
  153. UNIQUE KEY `uniq_saas_id_agent_num` (`saas_id`,`agent_num`),
  154. KEY `idx_saas_id_out_id` (`saas_id`,`out_id`)
  155. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='坐席监控表';
  156. /*!40101 SET character_set_client = @saved_cs_client */;
  157. --
  158. -- Dumping data for table `c_agent_monitor`
  159. --
  160. LOCK TABLES `c_agent_monitor` WRITE;
  161. /*!40000 ALTER TABLE `c_agent_monitor` DISABLE KEYS */;
  162. /*!40000 ALTER TABLE `c_agent_monitor` ENABLE KEYS */;
  163. UNLOCK TABLES;
  164. --
  165. -- Table structure for table `c_phone`
  166. --
  167. DROP TABLE IF EXISTS `c_phone`;
  168. /*!40101 SET @saved_cs_client = @@character_set_client */;
  169. /*!50503 SET character_set_client = utf8mb4 */;
  170. CREATE TABLE `c_phone` (
  171. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  172. `saas_id` varchar(16) NOT NULL DEFAULT '',
  173. `phone_num` varchar(32) NOT NULL DEFAULT '0',
  174. `phone_pwd` varchar(32) NOT NULL DEFAULT '',
  175. `sip_server` varchar(64) NOT NULL DEFAULT '',
  176. `wss_server` varchar(64) NOT NULL DEFAULT '',
  177. `ice_server` varchar(64) NOT NULL DEFAULT '',
  178. `is_delete` tinyint NOT NULL DEFAULT '0',
  179. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  180. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  181. PRIMARY KEY (`id`),
  182. KEY `idx_vcc_id_phone_num` (`saas_id`,`phone_num`)
  183. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='分机信息表';
  184. /*!40101 SET character_set_client = @saved_cs_client */;
  185. --
  186. -- Dumping data for table `c_phone`
  187. --
  188. LOCK TABLES `c_phone` WRITE;
  189. /*!40000 ALTER TABLE `c_phone` DISABLE KEYS */;
  190. 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');
  191. /*!40000 ALTER TABLE `c_phone` ENABLE KEYS */;
  192. UNLOCK TABLES;
  193. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  194. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  195. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  196. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  197. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  198. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  199. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  200. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  201. -- Dump completed on 2024-10-26 17:20:05