/*
 Navicat Premium Data Transfer

 Source Server         : 10.8.230.17
 Source Server Type    : MySQL
 Source Server Version : 50635
 Source Host           : 10.8.230.17:3308
 Source Schema         : wechat_cs_online

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

 Date: 02/04/2024 09:25:30
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for cb_customer
-- ----------------------------
DROP TABLE IF EXISTS `cb_customer`;
CREATE TABLE `cb_customer`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `open_kfid` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客服ID',
  `external_userid` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '微信客户的external_userid',
  `nickname` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '昵称',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '图片',
  `gender` tinyint(4) NOT NULL COMMENT '性别',
  `service_state` tinyint(4) NOT NULL DEFAULT -1 COMMENT '会话状态：0未处理，1由智能助手接待，2待接入池排队中，3由人工接待，4已结束/未开始',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '客户信息表' ROW_FORMAT = Compact;

SET FOREIGN_KEY_CHECKS = 1;
