/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 50610
Source Host           : 127.0.0.1:3306
Source Database       : rockkefu

Target Server Type    : MYSQL
Target Server Version : 50610
File Encoding         : 65001

Date: 2020-10-20 21:10:39
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `rockkefu_agent`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_agent`;
CREATE TABLE `rockkefu_agent` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `platid` int(11) DEFAULT '0',
  `agentkey` varchar(50) DEFAULT NULL,
  `callurl` varchar(200) DEFAULT NULL COMMENT '系统地址@@http开头',
  `optdt` datetime DEFAULT NULL,
  `status` tinyint(4) DEFAULT '1' COMMENT '状态',
  `name` varchar(50) NOT NULL COMMENT '名称',
  `picurl` varchar(50) DEFAULT NULL COMMENT '图标@@写路径',
  `kefuid` varchar(500) DEFAULT NULL COMMENT '分配客服',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of rockkefu_agent
-- ----------------------------
INSERT INTO `rockkefu_agent` VALUES ('1', '1', '6f46a242ffa9', 'http://www.rockoa.com/', '2020-10-14 18:28:26', '1', '信呼官网', 'http://demo.rockoa.com/images/logo.png', '1,2');

-- ----------------------------
-- Table structure for `rockkefu_chargems`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_chargems`;
CREATE TABLE `rockkefu_chargems` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` tinyint(1) DEFAULT '0',
  `mid` smallint(6) DEFAULT '0',
  `optdt` datetime DEFAULT NULL,
  `updatedt` datetime DEFAULT NULL,
  `key` varchar(200) DEFAULT NULL,
  `modeid` smallint(6) DEFAULT '0' COMMENT '对应安装模块Id',
  PRIMARY KEY (`id`),
  KEY `type` (`type`,`mid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='系统升级';

-- ----------------------------
-- Records of rockkefu_chargems
-- ----------------------------

-- ----------------------------
-- Table structure for `rockkefu_file`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_file`;
CREATE TABLE `rockkefu_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `filenum` varchar(20) DEFAULT NULL COMMENT '文件编号',
  `filename` varchar(200) DEFAULT NULL,
  `fileext` varchar(20) DEFAULT NULL,
  `filesize` int(11) DEFAULT NULL,
  `filesizecn` varchar(30) DEFAULT NULL,
  `filepath` varchar(100) DEFAULT NULL,
  `optid` int(11) DEFAULT NULL,
  `optname` varchar(50) DEFAULT NULL COMMENT '上传者',
  `adddt` datetime DEFAULT NULL,
  `ip` varchar(100) DEFAULT NULL,
  `web` varchar(300) DEFAULT NULL,
  `downci` int(11) DEFAULT '0' COMMENT '下载次数',
  `pdfpath` varchar(100) DEFAULT NULL COMMENT '转pdf后路径',
  `thumbpath` varchar(200) DEFAULT NULL COMMENT '缩略图地址',
  `onlynum` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='上传文件记录表';

-- ----------------------------
-- Records of rockkefu_file
-- ----------------------------

-- ----------------------------
-- Table structure for `rockkefu_history`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_history`;
CREATE TABLE `rockkefu_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` tinyint(1) DEFAULT '0' COMMENT '0咨询,1内部',
  `sendid` int(11) DEFAULT '0',
  `receid` int(11) DEFAULT '0',
  `optdt` datetime DEFAULT NULL,
  `cont` varchar(200) DEFAULT NULL,
  `stotal` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of rockkefu_history
-- ----------------------------

-- ----------------------------
-- Table structure for `rockkefu_logintoken`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_logintoken`;
CREATE TABLE `rockkefu_logintoken` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) DEFAULT '0',
  `token` varchar(20) NOT NULL DEFAULT '',
  `web` varchar(20) DEFAULT NULL COMMENT '浏览器',
  `cfrom` varchar(20) DEFAULT NULL COMMENT '来源',
  `adddt` datetime DEFAULT NULL,
  `moddt` datetime DEFAULT NULL,
  `ip` varchar(50) DEFAULT NULL,
  `device` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`,`token`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of rockkefu_logintoken
-- ----------------------------

-- ----------------------------
-- Table structure for `rockkefu_mess`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_mess`;
CREATE TABLE `rockkefu_mess` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` tinyint(1) DEFAULT '0' COMMENT '0咨询,1内部',
  `sendid` int(11) DEFAULT '0' COMMENT '发送人',
  `receid` int(11) DEFAULT '0' COMMENT '接收人',
  `cont` varchar(2000) DEFAULT NULL,
  `fileid` int(11) DEFAULT '0',
  `state` tinyint(1) DEFAULT '0' COMMENT '0未读,1已读',
  `optdt` datetime DEFAULT NULL,
  `slx` tinyint(1) DEFAULT '1' COMMENT '发送人类型0咨询人,1内部用户',
  PRIMARY KEY (`id`),
  KEY `type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='消息记录表';

-- ----------------------------
-- Records of rockkefu_mess
-- ----------------------------

-- ----------------------------
-- Table structure for `rockkefu_option`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_option`;
CREATE TABLE `rockkefu_option` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) DEFAULT NULL COMMENT '名称',
  `type` int(11) DEFAULT '0' COMMENT '选项类型',
  `pid` int(11) DEFAULT NULL,
  `num` varchar(50) DEFAULT NULL COMMENT '编号',
  `value` varchar(2000) DEFAULT NULL COMMENT '对应值',
  `sort` smallint(6) DEFAULT '0' COMMENT '排序号',
  `values` varchar(50) DEFAULT NULL,
  `valid` tinyint(1) DEFAULT '1',
  `optdt` datetime DEFAULT NULL,
  `optid` smallint(6) DEFAULT '0',
  `explain` varchar(200) DEFAULT NULL COMMENT '说明',
  PRIMARY KEY (`id`),
  KEY `num` (`num`),
  KEY `pid` (`pid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='系统选项';

-- ----------------------------
-- Records of rockkefu_option
-- ----------------------------

-- ----------------------------
-- Table structure for `rockkefu_party`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_party`;
CREATE TABLE `rockkefu_party` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `keyv` varchar(20) DEFAULT NULL COMMENT '唯一值',
  `name` varchar(50) DEFAULT NULL COMMENT '咨询客户姓名',
  `mobile` varchar(50) DEFAULT NULL,
  `qq` varchar(20) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `adddt` datetime DEFAULT NULL,
  `uid` int(11) DEFAULT '0' COMMENT '解答人员id',
  `sheng` varchar(20) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `xian` varchar(50) DEFAULT NULL,
  `address` varchar(100) DEFAULT NULL COMMENT '地址',
  `agentid` int(11) DEFAULT '0',
  `cfrom` varchar(50) DEFAULT NULL COMMENT '来源',
  `web` varchar(50) DEFAULT NULL COMMENT '浏览器',
  `ip` varchar(20) DEFAULT NULL,
  `optdt` datetime DEFAULT NULL,
  `cont` varchar(200) DEFAULT NULL,
  `stotal` int(11) DEFAULT '0' COMMENT '未读数',
  `isgb` tinyint(4) DEFAULT '0' COMMENT '是否关闭',
  `zxdt` datetime DEFAULT NULL COMMENT '最后在线时间',
  `zxzt` tinyint(4) DEFAULT '0' COMMENT '是否在线',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of rockkefu_party
-- ----------------------------

-- ----------------------------
-- Table structure for `rockkefu_users`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_users`;
CREATE TABLE `rockkefu_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user` varchar(50) DEFAULT NULL,
  `email` varchar(200) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL,
  `pass` varchar(50) DEFAULT NULL,
  `rand` varchar(10) DEFAULT NULL,
  `mobile` varchar(50) DEFAULT NULL,
  `face` varchar(200) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '1',
  `type` tinyint(1) DEFAULT '0',
  `regdt` datetime DEFAULT NULL,
  `ranking` varchar(30) DEFAULT NULL COMMENT '职位',
  `sort` int(11) DEFAULT '0' COMMENT '排序号',
  `wxstatus` tinyint(4) DEFAULT '0' COMMENT '0未关注，1已关注',
  PRIMARY KEY (`id`),
  UNIQUE KEY `user` (`user`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of rockkefu_users
-- ----------------------------
INSERT INTO `rockkefu_users` VALUES ('1', 'admin', 'admin@rockoa.com', '管理员', '36d7e7fd3f7c63e4211c56c3f7db2b11', '668432', null, 'images/face.jpg', '1', '1', '2020-09-15 15:56:32', '项目负责人', '0', '0');
INSERT INTO `rockkefu_users` VALUES ('2', 'diaochan', null, '貂蝉', '8796a56ea7c665d88135f282b52d04ca', '546731', null, 'images/kefu.jpg', '1', '2', '2020-10-07 17:59:24', '客服', '0', '0');
INSERT INTO `rockkefu_users` VALUES ('3', 'zhaozl', null, '赵子龙', 'c7545790b853d24b33b7281ba127469c', '500726', null, null, '1', '0', '2020-10-10 12:28:22', '客服', '0', '0');
INSERT INTO `rockkefu_users` VALUES ('4', 'xiaoqiao', null, '小乔', 'f6feaa1aea4f616acea5d2a80639e76c', '748220', null, null, '1', '0', '2020-10-14 10:59:06', '客服', '0', '0');

-- ----------------------------
-- Table structure for `rockkefu_wenti`
-- ----------------------------
DROP TABLE IF EXISTS `rockkefu_wenti`;
CREATE TABLE `rockkefu_wenti` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL COMMENT '标题',
  `url` varchar(100) DEFAULT NULL COMMENT '地址@@http开头',
  `type` tinyint(1) DEFAULT '0' COMMENT '类型@0|常用地址,1|关键词,2|快捷回复',
  `uid` int(11) DEFAULT '0' COMMENT '相应id',
  `sort` int(11) DEFAULT '0' COMMENT '排序号',
  `targ` varchar(50) DEFAULT NULL COMMENT '关键词@@多个,分开',
  `content` varchar(300) DEFAULT NULL COMMENT '内容',
  `status` tinyint(1) DEFAULT '1' COMMENT '状态@0|停用,1|启用',
  `agentid` int(11) DEFAULT '0' COMMENT '对应应用',
  `color` varchar(30) DEFAULT NULL COMMENT '标题颜色',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of rockkefu_wenti
-- ----------------------------
INSERT INTO `rockkefu_wenti` VALUES ('3', '这个系统怎么部署？', 'view_install.html', '0', '0', '0', null, null, '1', '1', null);
INSERT INTO `rockkefu_wenti` VALUES ('4', '有什么可以帮你', null, '2', '0', '0', null, '您好，有什么可以帮到你的吗？', '1', '0', null);
INSERT INTO `rockkefu_wenti` VALUES ('5', '遇到什么问题', null, '2', '0', '0', null, '您好，请问您遇到什么问题了呢，有什么可以效劳的呢？', '1', '0', null);
INSERT INTO `rockkefu_wenti` VALUES ('6', '没有签授不能使用？', 'view_auther.html', '0', '0', '0', null, null, '1', '1', null);
INSERT INTO `rockkefu_wenti` VALUES ('7', '这个界面怎么截屏？', null, '1', '0', '0', '截屏', '可以用QQ快捷方式截屏后，在输入框按Ctrl+v粘贴。', '1', '0', null);
INSERT INTO `rockkefu_wenti` VALUES ('8', '授权版和开源版区别', null, '1', '0', '0', null, '详情区别查看地址：{URL}view_xinhu.html', '1', '1', 'red');
