-- ----------------------------
-- Table structure for `__PREFIX__fastim_config`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_config` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `name` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '变量名',
    `group` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '分组',
    `title` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '变量标题',
    `tip` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '变量描述',
    `type` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '类型:string,text,int,bool,array,datetime,date,file',
    `value` text COLLATE utf8mb4_unicode_ci COMMENT '变量值',
    `content` text COLLATE utf8mb4_unicode_ci COMMENT '变量字典数据',
    `rule` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '验证规则',
    `extend` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '扩展属性',
    `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
    `user_settings` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '用户的配置项',
    `user_exclusive` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '用户专有配置项',
    `uniapp_available` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'uniapp可用的配置项',
    PRIMARY KEY (`id`),
    UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='IM配置';

-- ----------------------------
-- Records of __PREFIX__fastim_config
-- ----------------------------
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'configgroup', 'general', 'Config group', '', 'array', '{\"general\":\"General\",\"privacy\":\"Privacy\",\"csr\":\"CSR\",\"message_push\":\"Message Push\"}', null, '', '', '0', '0', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'login_status', 'general', 'Post login status', '', 'select', '0', '[\"在线\",\"繁忙\",\"隐身\"]', '', '', '50', '1', '1', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'busy_reply', 'general', 'Auto reply when busy', '', 'text', '你好，我现在有事不在，一会儿再和你联系~', null, '', '', '49', '1', '1', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'im_name', 'general', 'Im name', '', 'string', 'FastIm', null, '', '', '48', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'send_message_key', 'general', 'Send Message button', '', 'radio', '0', '[\"回车键\",\"CTRL+回车键\"]', '', '', '47', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'ecs_exit', 'general', 'Press ESC to close the window', '', 'radio', '1', '[\"不关闭\",\"关闭\"]', '', '', '46', '1', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'new_message_shake', 'general', 'New message window jitter', '', 'radio', '1', '[\"不抖动\",\"抖动\"]', '', '', '45', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'new_message_sound', 'general', 'New message playing tone', '', 'radio', '1', '[\"不播放\",\"播放\"]', '', '', '44', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'new_message_push_notice', 'general', 'New message push notice', 'web端使用Notification API推送消息', 'radio', '1', '[\"不推送\",\"推送\"]', '', '', '43', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'window_display_push_notice', 'general', 'Window display push notification', '用户在浏览当前网页时,不推送通知', 'radio', '0', '[\"不推送\",\"推送\"]', '', '', '42', '1', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'trajectory_save_cycle', 'general', 'Trajectory Save Cycle', '', 'radio', '0', '[\"保留7天\",\"保留30天\",\"保留60天\",\"不清理\"]', '', '', '41', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'h5_url', 'general', 'H5 Url', '请使用uni-app代码编译H5端，具体请查看<a target="_blank" href="https://doc.fastadmin.net/fastim/1020.html">文档</a>', 'string', '/h5', null, '', '', '40', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'verify_method', 'privacy', 'Add me as a friend', '', 'radio', '0', '[\"需要验证信息\",\"允许任何人添加\"]', '', '', '50', '1', '1', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'add_my_way', 'privacy', 'Add my way', '', 'checkbox', '0,1,2,3', '[\"搜索ID\",\"搜索昵称\",\"搜索手机号\",\"搜索邮箱\"]', '', '', '49', '1', '1', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'temp_session', 'privacy', 'Temporary session', '', 'radio', '1', '[\"不允许\",\"允许\"]', '', '', '48', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'input_status', 'privacy', 'Display input status', '', 'radio', '1', '[\"不展示\",\"展示\"]', '', '', '47', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'mobile_privacy', 'privacy', 'Mobile privacy', '', 'select', '1', '[\"全部可见\",\"仅好友可见\",\"仅自己可见\"]', '', '', '46', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'email_privacy', 'privacy', 'Email privacy', '', 'select', '1', '[\"全部可见\",\"仅好友可见\",\"仅自己可见\"]', '', '', '45', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'age_privacy', 'privacy', 'Age privacy', '', 'select', '1', '[\"全部可见\",\"仅好友可见\",\"仅自己可见\"]', '', '', '44', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'occupation_privacy', 'privacy', 'Occupation privacy', '', 'select', '1', '[\"全部可见\",\"仅好友可见\",\"仅自己可见\"]', '', '', '43', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'company_privacy', 'privacy', 'Company privacy', '', 'select', '1', '[\"全部可见\",\"仅好友可见\",\"仅自己可见\"]', '', '', '42', '1', '0', '1');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'open_csr', 'csr', 'Open CSR', '开启客服功能,将自动为所有用户分配\"我的客服\"会话', 'radio', '1', '[\"关闭\",\"开启\"]', '', '', '50', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'new_user_tip', 'csr', 'new User Tip', '', 'string', '您准备好体验企业IM客服系统了吗？', '', '', '', '49', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'distribution_group_select', 'csr', 'Distribution Group Select', '为用户分配客服时是否要求用户选择客服分组', 'radio', '1', '[\"为用户分配客服前要求用户选择客服类型\",\"无需选择客服分组\"]', '', '', '48', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'distribution_type', 'csr', 'Distribution Type', '客服分配方式', 'radio', '2', '[\"轮训自动分配\",\"按工作量自动分配\",\"用户自行选择客服代表\"]', '', '', '47', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'welcome_new_user_msg', 'csr', 'Welcome New User Msg', '客服接入新用户时自动发送的欢迎消息', 'text', '欢迎访问！', null, '', '', '46', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'no_csr_tip', 'csr', 'No CSR Tip', '无客服在线时给用户的提示', 'text', '您好，人工客服工作时间为：上午8:00至下午18:00。请在工作时间联系人工客服哦~您也可以选择：1、使用不同的关键词询问智能客服。2、点击左下角菜单内的问题反馈给我们留言，我们会尽快与您联系~', null, '', '', '45', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'uni_push_switch', 'message_push', 'UniPush Switch', '', 'radio', '0', '[\"关闭\",\"开启\"]', '', '', '50', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'uni_push_appid', 'message_push', 'UniPush appId', '请<a target="_blank" href="https://doc.fastadmin.net/fastim/1021.html">参考文档</a>后进行配置', 'string', '', null, '', '', '49', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'uni_push_appkey', 'message_push', 'UniPush appKey', '', 'string', '', null, '', '', '48', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'uni_push_master_secret', 'message_push', 'UniPush masterSecret', '', 'string', '', null, '', '', '47', '0', '0', '0');
INSERT IGNORE INTO `__PREFIX__fastim_config` VALUES ('', 'package_name_android', 'message_push', 'Package Name Android', '', 'string', '', null, '', '', '46', '0', '0', '0');

-- ----------------------------
-- Table structure for `__PREFIX__fastim_csr_group`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_csr_group` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `name` varchar(100) NOT NULL DEFAULT '' COMMENT '分组名称',
    `note` varchar(100) NOT NULL DEFAULT '' COMMENT '备注',
    `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
    `status` enum('1','0') NOT NULL DEFAULT '0' COMMENT '状态:0=隐藏,1=正常',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    `deletetime` int(10) unsigned DEFAULT NULL COMMENT '删除时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='客服分组表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_emoji`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_emoji` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `group` varchar(20) NOT NULL DEFAULT 'default' COMMENT '分组',
    `name` varchar(20) NOT NULL DEFAULT '' COMMENT '名称',
    `code` varchar(20) NOT NULL DEFAULT '' COMMENT '唯一代码',
    `image` varchar(200) NOT NULL DEFAULT '' COMMENT '图片地址',
    `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
    `unicode` varchar(20) NOT NULL DEFAULT '' COMMENT 'unicode编码',
    `status` enum('1','0') NOT NULL DEFAULT '1' COMMENT '状态:0=隐藏,1=正常',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='Emoji表';

-- ----------------------------
-- Records of __PREFIX__fastim_emoji
-- ----------------------------
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '龇牙', '[/zy]', '/assets/addons/fastim/img/emoji/1f601.png', '0', '1f601', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '笑哭', '[/xk]', '/assets/addons/fastim/img/emoji/1f602.png', '0', '1f602', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '开心', '[/kx]', '/assets/addons/fastim/img/emoji/1f603.png', '0', '1f603', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '微笑', '[/wx]', '/assets/addons/fastim/img/emoji/1f604.png', '0', '1f604', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '尴尬', '[/gg]', '/assets/addons/fastim/img/emoji/1f605.png', '0', '1f605', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '对眼笑', '[/dyx]', '/assets/addons/fastim/img/emoji/1f606.png', '0', '1f606', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '微笑光环', '[/wxgh]', '/assets/addons/fastim/img/emoji/1f607.png', '0', '1f607', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '眨眼', '[/zy]', '/assets/addons/fastim/img/emoji/1f609.png', '0', '1f609', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '不悦', '[/by]', '/assets/addons/fastim/img/emoji/1f612.png', '0', '1f612', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '汗', '[/h]', '/assets/addons/fastim/img/emoji/1f613.png', '0', '1f613', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '悲伤', '[/bs]', '/assets/addons/fastim/img/emoji/1f614.png', '0', '1f614', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '折磨', '[/zm]', '/assets/addons/fastim/img/emoji/1f616.png', '0', '1f616', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '右亲亲', '[/yqq]', '/assets/addons/fastim/img/emoji/1f618.png', '0', '1f618', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '发怒', '[/fn]', '/assets/addons/fastim/img/emoji/1f621.png', '0', '1f621', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '瞪眼汗', '[/dyh]', '/assets/addons/fastim/img/emoji/1f622.png', '0', '1f622', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '生气', '[/sq]', '/assets/addons/fastim/img/emoji/1f624.png', '0', '1f624', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '迷茫', '[/mm]', '/assets/addons/fastim/img/emoji/1f625.png', '0', '1f625', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '害怕', '[/hp]', '/assets/addons/fastim/img/emoji/1f628.png', '0', '1f628', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '快哭了', '[/kkl]', '/assets/addons/fastim/img/emoji/1f629.png', '0', '1f629', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '惊讶', '[/jy]', '/assets/addons/fastim/img/emoji/1f631.png', '0', '1f631', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '不忍直视', '[/brzs]', '/assets/addons/fastim/img/emoji/1f632.png', '0', '1f632', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '瞪着你', '[/dzn]', '/assets/addons/fastim/img/emoji/1f633.png', '0', '1f633', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '戴口罩', '[/dkz]', '/assets/addons/fastim/img/emoji/1f637.png', '0', '1f637', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '不可以', '[/bky]', '/assets/addons/fastim/img/emoji/1f645.png', '0', '1f645', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '摸头', '[/mt]', '/assets/addons/fastim/img/emoji/1f646.png', '0', '1f646', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '举手', '[/js]', '/assets/addons/fastim/img/emoji/1f64b.png', '0', '1f64b', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '举双手', '[/jss]', '/assets/addons/fastim/img/emoji/1f64c.png', '0', '1f64c', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '哀伤', '[/as]', '/assets/addons/fastim/img/emoji/1f64d.png', '0', '1f64d', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '捂口鼻', '[/wkb]', '/assets/addons/fastim/img/emoji/1f64a.png', '0', '1f64a', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '捂眼', '[/wy]', '/assets/addons/fastim/img/emoji/1f648.png', '0', '1f648', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '祈祷', '[/qd]', '/assets/addons/fastim/img/emoji/1f64f.png', '0', '1f64f', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '大哭', '[/dk]', '/assets/addons/fastim/img/emoji/1f62d.png', '0', '1f62d', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '可爱', '[/ka]', '/assets/addons/fastim/img/emoji/1f60a.png', '0', '1f60a', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '吐舌头', '[/tst]', '/assets/addons/fastim/img/emoji/1f60b.png', '0', '1f60b', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '闭眼笑', '[/byx]', '/assets/addons/fastim/img/emoji/1f60c.png', '0', '1f60c', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '色', '[/s]', '/assets/addons/fastim/img/emoji/1f60d.png', '0', '1f60d', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '邪笑', '[/xx]', '/assets/addons/fastim/img/emoji/1f60f.png', '0', '1f60f', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '眨眼笑', '[/zyx]', '/assets/addons/fastim/img/emoji/1f61c.png', '0', '1f61c', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '眯眼笑', '[/myx]', '/assets/addons/fastim/img/emoji/1f61d.png', '0', '1f61d', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '不开心', '[/bkx]', '/assets/addons/fastim/img/emoji/1f61e.png', '0', '1f61e', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '叹气', '[/tq]', '/assets/addons/fastim/img/emoji/1f62a.png', '0', '1f62a', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '快哭了', '[/kkl]', '/assets/addons/fastim/img/emoji/1f62b.png', '0', '1f62b', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '右斜笑眼', '[/yxxy]', '/assets/addons/fastim/img/emoji/1f31a.png', '0', '1f31a', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '左斜笑眼', '[/zxxy]', '/assets/addons/fastim/img/emoji/1f31d.png', '0', '1f31d', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '爱心', '[/ax]', '/assets/addons/fastim/img/emoji/2764.png', '0', '2764', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '信封', '[/xf]', '/assets/addons/fastim/img/emoji/2709.png', '0', '2709', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '飞机', '[/fj]', '/assets/addons/fastim/img/emoji/2708.png', '0', '2708', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', 'OK', '[/ok]', '/assets/addons/fastim/img/emoji/1f44c.png', '0', '1f44c', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '赞', '[/z]', '/assets/addons/fastim/img/emoji/1f44d.png', '0', '1f44d', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '石头', '[/st]', '/assets/addons/fastim/img/emoji/270a.png', '0', '270a', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '布', '[/b]', '/assets/addons/fastim/img/emoji/270b.png', '0', '270b', '1');
INSERT IGNORE INTO `__PREFIX__fastim_emoji` VALUES ('', 'default', '剪刀', '[/jd]', '/assets/addons/fastim/img/emoji/270c.png', '0', '270c', '1');

-- ----------------------------
-- Table structure for `__PREFIX__fastim_fast_reply`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_fast_reply` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '所属客服',
    `title` varchar(100) NOT NULL DEFAULT '' COMMENT '标题',
    `content` text NOT NULL COMMENT '回复内容',
    `status` enum('1','0') NOT NULL DEFAULT '1' COMMENT '状态:0=关闭,1=启用',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    `deletetime` int(10) unsigned DEFAULT NULL COMMENT '删除时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='快捷回复表';

-- ----------------------------
-- Records of __PREFIX__fastim_fast_reply
-- ----------------------------
INSERT IGNORE INTO `__PREFIX__fastim_fast_reply` VALUES ('', '0', '打招呼', '您好，请问有什么可以帮您？', '1', '1620659906', null);
INSERT IGNORE INTO `__PREFIX__fastim_fast_reply` VALUES ('', '0', '询问联系方式', '您可以提供下您的联系方式么？您的电话是？或者QQ，我们可以更方便的联系您！', '1', '1620659906', null);
INSERT IGNORE INTO `__PREFIX__fastim_fast_reply` VALUES ('', '0', '提示客户等待-处理中', '请稍等片刻，我们正在为您处理！', '1', '1620659906', null);
INSERT IGNORE INTO `__PREFIX__fastim_fast_reply` VALUES ('', '0', '提示客户等待-问', '我去问一下，您稍等片刻~', '1', '1620659906', null);
INSERT IGNORE INTO `__PREFIX__fastim_fast_reply` VALUES ('', '0', '道别', '那好，祝您生活愉快，再见！', '1', '1620659906', null);

-- ----------------------------
-- Table structure for `__PREFIX__fastim_friendship`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_friendship` (
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
    `friend_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '好友ID',
    `group` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '分组ID',
    `remark` varchar(30) NOT NULL DEFAULT '' COMMENT '备注名',
    `top_contacts` tinyint(1) NOT NULL DEFAULT '0' COMMENT '常用联系人',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    PRIMARY KEY (`user_id`,`friend_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='好友关系表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_group`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_group` (
    `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类型:0=好友分组,1=群聊分组,2=收藏分组',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户',
    `name` varchar(50) NOT NULL DEFAULT '' COMMENT '分组名称',
    `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
    PRIMARY KEY (`id`),
    KEY `type_userid` (`type`,`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='各类分组表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_group_chat`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_group_chat` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `leader` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '群主',
    `avatar` varchar(200) NOT NULL DEFAULT '' COMMENT '头像',
    `nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '群昵称',
    `bio` varchar(200) NOT NULL DEFAULT '' COMMENT '群介绍',
    `max_user_count` smallint(5) unsigned NOT NULL DEFAULT '200' COMMENT '最大成员数量',
    `add_mode` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '加群模式:0=需管理员审核,1=无需审核',
    `invite_join_group` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '邀请模式:0=成员邀请好友无需审核,1=需要审核',
    `speak` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '禁止成员发言:0=允许发言,1=禁止发言',
    `history_message` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '历史消息:0=不允许新入群用户查看,1=允许新入群用户查看',
    `retrieval_settings` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '检索设置:0=禁用搜素加群,1=允许被搜素到',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    `deletetime` int(10) unsigned DEFAULT NULL COMMENT '删除时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='群聊表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_group_user`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_group_user` (
    `group_id` int(10) unsigned NOT NULL COMMENT '群ID',
    `user_id` int(10) unsigned NOT NULL COMMENT '用户ID',
    `session_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '群聊会话ID',
    `nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '群内昵称',
    `level` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
    `score` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '积分',
    `last_read_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后阅读消息',
    `user_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户分组',
    `block_messages` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '屏蔽群消息',
    `speaktime` int(10) unsigned DEFAULT NULL COMMENT '最后发言时间',
    `jointime` int(10) unsigned DEFAULT NULL COMMENT '加入时间',
    PRIMARY KEY (`group_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='群聊用户表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_kbs`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_kbs` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `title` varchar(100) NOT NULL DEFAULT '' COMMENT '标题',
    `keyword` varchar(100) NOT NULL DEFAULT '' COMMENT '关键词',
    `content` text NOT NULL COMMENT '内容',
    `views` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '浏览量',
    `likes` mediumint(9) unsigned NOT NULL DEFAULT '0' COMMENT '有帮助数',
    `dislikes` mediumint(9) unsigned NOT NULL DEFAULT '0' COMMENT '无帮助数',
    `note` varchar(100) NOT NULL DEFAULT '' COMMENT '备注',
    `status` enum('1','0') NOT NULL DEFAULT '0' COMMENT '状态:0=隐藏,1=正常',
    `weigh` int(10) NOT NULL DEFAULT '0' COMMENT '权重',
    `updatetime` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    `deletetime` int(10) unsigned DEFAULT NULL COMMENT '删除时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='知识库';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_message`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_message` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `type` enum('voice','group_chat_notice','kbs_list','friend_apply','group_invitation','group_notice','group_apply','system','link','file','video','audio','image','default') NOT NULL DEFAULT 'default' COMMENT '消息类型:default=普通,image=图片,audio=音频,video=视频,file=文件,link=链接,system=系统,group_apply=申请入群,group_notice=群通知,group_invitation=邀请入群,friend_apply=好友申请,kbs_list=知识库消息,group_chat_notice=群公告,voice=语音',
    `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '群聊ID',
    `session_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会话ID',
    `sender_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发送人',
    `recipient_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '接受人',
    `message` text COMMENT '消息内容',
    `read_number` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '群消息阅读数',
    `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态:0=未读,1=已读,2=发送中,3=隐藏状态,4=失败',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    `deleteuser` int(10) unsigned DEFAULT NULL COMMENT '删除消息用户',
    PRIMARY KEY (`id`),
    KEY `group_id` (`group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='消息记录表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_report`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_report` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `type` enum('user','group','feedback') NOT NULL DEFAULT 'feedback' COMMENT '类型:user=举报用户,group=举报群聊,feedback=问题反馈',
    `session_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '会话ID',
    `report_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '举报人',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '被举报对象',
    `describe` varchar(200) NOT NULL DEFAULT '' COMMENT '举报详情',
    `mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '联系方式',
    `reportimage` varchar(400) NOT NULL DEFAULT '' COMMENT '举报证据',
    `status` enum('1','0') NOT NULL DEFAULT '0' COMMENT '状态:0=未处理,1=已处理',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='举报记录表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_service`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_service` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `avatar` varchar(100) NOT NULL DEFAULT '' COMMENT '头像',
    `nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '显示昵称',
    `bio` varchar(100) NOT NULL DEFAULT '' COMMENT '介绍',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='服务账号表';

-- ----------------------------
-- Records of __PREFIX__fastim_service
-- ----------------------------
INSERT IGNORE INTO `__PREFIX__fastim_service` VALUES ('1', '/assets/addons/fastim/img/new_friends.png', '新朋友', '接受新好友验证消息');
INSERT IGNORE INTO `__PREFIX__fastim_service` VALUES ('2', '', '群通知', '接受群聊通知消息');
INSERT IGNORE INTO `__PREFIX__fastim_service` VALUES ('3', '/assets/addons/fastim/img/csr.png', '智能客服小蜜', '接受客服服务消息');

-- ----------------------------
-- Table structure for `__PREFIX__fastim_session`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_session` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `type` enum('service','group','single') NOT NULL DEFAULT 'single' COMMENT '类型:single=单聊,group=群聊,service=服务号',
    `user_one` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户1',
    `user_two` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户2',
    `chat_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '群聊或服务号id',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    `deleteuser` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户单方删除',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='会话表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_session_top`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_session_top` (
    `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '用户',
    `session_id` int(10) NOT NULL DEFAULT '0' COMMENT '会话',
    `top` int(10) NOT NULL DEFAULT '0' COMMENT '置顶顺序',
    PRIMARY KEY (`user_id`,`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会话置顶记录';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_todo`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_todo` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户',
    `title` text NOT NULL COMMENT '待办标题',
    `status` enum('1','0') NOT NULL DEFAULT '0' COMMENT '状态:0=未完成,1=已完成',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    `deletetime` int(10) unsigned DEFAULT NULL COMMENT '删除时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='用户待办事项';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_trajectory`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_trajectory` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
    `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '轨迹类型:0=访问',
    `note` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '轨迹描述',
    `url` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '访问URL',
    `referrer` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '来路',
    `ip` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'IP',
    `tourist` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '游客登录:0=否,1=是',
    `extend` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '扩展数据',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '添加时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户轨迹表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_user`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_user` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `type` enum('tourist','user','csr') NOT NULL DEFAULT 'tourist' COMMENT '用户类型:tourist=游客,user=会员,csr=客服',
    `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '客服分组',
    `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '绑定用户',
    `admin_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '绑定管理员',
    `avatar` varchar(200) NOT NULL DEFAULT '' COMMENT '头像',
    `nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '昵称',
    `referrer` varchar(200) NOT NULL DEFAULT '' COMMENT '用户来路',
    `mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '手机',
    `email` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱',
    `gender` enum('female','male','secrecy') NOT NULL DEFAULT 'secrecy' COMMENT '性别:secrecy=保密,male=男,female=女',
    `age` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '年龄',
    `birthday` date DEFAULT NULL COMMENT '生日',
    `bio` varchar(200) NOT NULL DEFAULT '' COMMENT '格言',
    `occupation` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '职业',
    `company` varchar(100) NOT NULL DEFAULT '' COMMENT '公司',
    `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态:0=离线,1=在线,2=忙碌,3=隐身',
    `note` varchar(255) NOT NULL DEFAULT '' COMMENT '客服备注',
    `token` varchar(59) NOT NULL DEFAULT '' COMMENT 'Token',
    `auth_token` varchar(32) NOT NULL DEFAULT '' COMMENT '授权Token',
    `loginip` varchar(50) NOT NULL DEFAULT '' COMMENT '登录ip',
    `wechat_openid` varchar(28) NOT NULL DEFAULT '' COMMENT '微信openid',
    `welcome_msg` text COMMENT '客服欢迎语',
    `reception_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '客服当前接待量',
    `last_reception_time` int(10) unsigned DEFAULT NULL COMMENT '客服上次接待时间',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='用户表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_user_collection`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_user_collection` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户',
    `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '分组',
    `type` enum('kbs_list','link','file','video','audio','image','default') NOT NULL DEFAULT 'default' COMMENT '消息类型:default=普通,image=图片,audio=音频,video=视频,file=文件,link=链接,kbs_list=知识库消息',
    `value` text COMMENT '收藏内容',
    `from` varchar(50) NOT NULL DEFAULT '' COMMENT '来自',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '收藏时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='用户收藏';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_user_config`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_user_config` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户',
    `name` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '变量名',
    `value` text COLLATE utf8mb4_unicode_ci COMMENT '变量值',
    PRIMARY KEY (`id`),
    KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户配置表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_user_push_clientid`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_user_push_clientid` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
    `clientid` varchar(32) NOT NULL DEFAULT '' COMMENT 'clientid',
    `platform` enum('android','ios') NOT NULL DEFAULT 'android' COMMENT '用户系统平台',
    `updatetime` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='用户推送clientid表';

-- ----------------------------
-- Table structure for `__PREFIX__fastim_user_shield`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_user_shield` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户',
    `shield_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '被屏蔽人',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='用户屏蔽关系表';

-- ----------------------------
-- v1.0.1 Table structure for `__PREFIX__fastim_group_chat_notice`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_group_chat_notice` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '群聊',
    `publisher` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发布人',
    `content` text NOT NULL COMMENT '内容',
    `images` varchar(500) NOT NULL DEFAULT '' COMMENT '图片',
    `popup` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '使用弹窗展示公告:0=否,1=是',
    `receipt` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '需群成员确认:0=否,1=是',
    `top` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '置顶:0=否,1=是',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '发布时间',
    `deletetime` int(10) unsigned DEFAULT NULL COMMENT '删除时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='群聊公告';

-- ----------------------------
-- v1.0.1 Table structure for `__PREFIX__fastim_reading_log`
-- ----------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_reading_log` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '阅读类型:0=群公告,1=语音消息播放状态,2=预阅读的@消息',
    `group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '群聊ID',
    `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
    `data_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '数据ID',
    `receipt` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '确认:0=否,1=是',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '阅读时间',
    `confirmtime` int(10) unsigned DEFAULT NULL COMMENT '确认时间',
    PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COMMENT='通用阅读日志';

-- ---------------------------
-- v1.0.1 Table structure for `__PREFIX__fastim_captcha`
-- ---------------------------
CREATE TABLE IF NOT EXISTS `__PREFIX__fastim_captcha` (
    `key` varchar(32) NOT NULL DEFAULT '' COMMENT '验证码Key',
    `code` varchar(32) NOT NULL DEFAULT '' COMMENT '验证码',
    `captcha` varchar(6) NOT NULL DEFAULT '' COMMENT '验证码(供uniapp安卓二次生成图片)',
    `createtime` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
    `expiretime` int(10) unsigned DEFAULT NULL COMMENT '过期时间',
    PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户验证码表';