database.sql 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. --
  2. -- 数据库: `im`
  3. --
  4. -- --------------------------------------------------------
  5. --
  6. -- 表的结构 `yu_config`
  7. --
  8. CREATE TABLE `yu_config` (
  9. `id` int(11) NOT NULL,
  10. `name` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  11. `value` json DEFAULT NULL,
  12. `create_user` int(11) NOT NULL DEFAULT '0',
  13. `update_time` int(11) NOT NULL DEFAULT '0',
  14. `create_time` int(11) NOT NULL DEFAULT '0',
  15. `remark` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  16. `status` tinyint(1) NOT NULL DEFAULT '1'
  17. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='配置表';
  18. --
  19. -- 转存表中的数据 `yu_config`
  20. --
  21. INSERT INTO `yu_config` (`id`, `name`, `value`, `create_user`, `update_time`, `create_time`, `remark`, `status`) VALUES
  22. (1, 'sysInfo', '{\"logo\": \"\", \"name\": \"Raingad-IM\", \"state\": \"1\", \"regauth\": \"0\", \"regtype\": \"2\", \"runMode\": \"1\", \"ipregion\": \"1\", \"closeTips\": \"系统升级维护中,请稍候再试!\", \"description\": \"一款基于vue2.0的即时通信系统\", \"registerInterval\": \"600\"}', 0, 1688462862, 1688462862, NULL, 1),
  23. (2, 'chatInfo', '{\"stun\": \"\", \"online\": \"1\", \"webrtc\": \"0\", \"dbDelMsg\": \"1\", \"msgClear\": \"1\", \"redoTime\": \"120\", \"stunPass\": \"\", \"stunUser\": \"\", \"groupChat\": \"1\", \"simpleChat\": \"1\", \"autoAddUser\": {\"status\": \"0\", \"welcome\": \"你好啊,欢迎来到Raingad-IM\", \"user_ids\": [\"1\", \"2\", \"3\"], \"user_items\": [\"1\", \"2\", \"3\"]}, \"msgClearDay\": \"30\", \"autoAddGroup\": {\"name\": \"春游交流\", \"status\": \"0\", \"userMax\": \"100\", \"owner_uid\": \"1\", \"owner_info\": [{\"id\": \"1\", \"avatar\": \"", \"user_id\": \"1\", \"realname\": \"管理员\"}]}, \"groupUserMax\": \"0\", \"sendInterval\": \"0\"}', 0, 1688463300, 1688463300, NULL, 1),
  24. (3, 'smtp', '{\"addr\": \"xiekunyu@sss.com\", \"host\": \"smtp.exmail.qq.com\", \"pass\": \"ssss\", \"port\": \"465\", \"sign\": \"Raingad-IM\", \"security\": \"ssl\"}', 0, 1688464072, 1688464072, NULL, 1),
  25. (4, 'fileUpload', '{\"disk\": \"local\", \"size\": \"50\", \"qiniu\": {\"url\": \"\", \"bucket\": \"\", \"accessKey\": \"\", \"secretKey\": \"\"}, \"aliyun\": {\"url\": \"\", \"bucket\": \"\", \"accessId\": \"\", \"endpoint\": \"\", \"accessSecret\": \"\"}, \"qcloud\": {\"cdn\": \"\", \"appId\": \"\", \"bucket\": \"\", \"region\": \"\", \"secretId\": \"\", \"secretKey\": \"\"}, \"fileExt\": [\"jpg\", \"jpeg\", \"ico\", \"webp\", \"bmp\", \"gif\", \"pdf\", \"mp3\", \"wav\", \"wmv\", \"amr\", \"mp4\", \"3gp\", \"avi\", \"m2v\", \"mkv\", \"mov\", \"ppt\", \"pptx\", \"doc\", \"docx\", \"xls\", \"xlsx\", \"txt\", \"md\", \"hevc\", \"png\", \"KLKV\"], \"preview\": \"\"}', 0, 1688464130, 1688464130, NULL, 1),
  26. (5, 'compass', '{\"list\": [], \"mode\": 1, \"status\": 0}', 0, 1688464130, 1688464130, NULL, 1);
  27. -- --------------------------------------------------------
  28. --
  29. -- 表的结构 `yu_file`
  30. --
  31. CREATE TABLE `yu_file` (
  32. `file_id` int(11) NOT NULL,
  33. `cate` tinyint(1) NOT NULL DEFAULT '9' COMMENT '文件分类',
  34. `file_type` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件类型',
  35. `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '父Id',
  36. `name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名称',
  37. `src` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '链接',
  38. `size` int(11) DEFAULT '0' COMMENT '大小',
  39. `ext` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件后缀',
  40. `md5` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'md5',
  41. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '创建人',
  42. `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  43. `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  44. `delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '删除时间',
  45. `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  46. `is_lock` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否锁定'
  47. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='文件库';
  48. -- --------------------------------------------------------
  49. --
  50. -- 表的结构 `yu_friend`
  51. --
  52. CREATE TABLE `yu_friend` (
  53. `friend_id` int(11) NOT NULL,
  54. `friend_user_id` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '好友ID',
  55. `nickname` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '好友备注',
  56. `is_invite` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为邀请方',
  57. `is_top` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否置顶',
  58. `is_notice` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否消息提醒',
  59. `create_user` int(11) NOT NULL DEFAULT '0',
  60. `update_time` int(11) NOT NULL DEFAULT '0',
  61. `create_time` int(11) NOT NULL DEFAULT '0',
  62. `delete_time` int(11) NOT NULL DEFAULT '0',
  63. `remark` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '申请备注',
  64. `status` tinyint(1) NOT NULL DEFAULT '1'
  65. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='联系人置顶表';
  66. -- --------------------------------------------------------
  67. --
  68. -- 表的结构 `yu_group`
  69. --
  70. CREATE TABLE `yu_group` (
  71. `group_id` int(11) NOT NULL,
  72. `name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '团队名称',
  73. `name_py` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '团队的拼音',
  74. `avatar` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '群聊头像',
  75. `level` tinyint(1) NOT NULL DEFAULT '1' COMMENT '等级',
  76. `create_user` int(11) NOT NULL DEFAULT '0' COMMENT '创建人',
  77. `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  78. `owner_id` int(11) NOT NULL DEFAULT '0' COMMENT '拥有者',
  79. `is_public` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否公开',
  80. `notice` mediumtext COLLATE utf8mb4_unicode_ci COMMENT '公告',
  81. `setting` mediumtext COLLATE utf8mb4_unicode_ci COMMENT '设置',
  82. `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  83. `delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '删除时间'
  84. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  85. -- --------------------------------------------------------
  86. --
  87. -- 表的结构 `yu_group_user`
  88. --
  89. CREATE TABLE `yu_group_user` (
  90. `id` int(11) NOT NULL,
  91. `group_id` int(11) NOT NULL DEFAULT '0' COMMENT '团队Id',
  92. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户Id',
  93. `role` tinyint(1) NOT NULL DEFAULT '2' COMMENT '角色 1拥有者,2管理员,3成员',
  94. `invite_id` int(11) NOT NULL DEFAULT '0' COMMENT '邀请人',
  95. `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  96. `unread` int(11) NOT NULL DEFAULT '0' COMMENT '群未读消息',
  97. `is_notice` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1是否提醒',
  98. `is_top` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否置顶',
  99. `no_speak_time` int(11) NOT NULL DEFAULT '0' COMMENT '禁言到期时间',
  100. `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态 0 ,未同意邀请,1,同意',
  101. `delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '删除时间'
  102. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  103. -- --------------------------------------------------------
  104. --
  105. -- 表的结构 `yu_message`
  106. --
  107. CREATE TABLE `yu_message` (
  108. `msg_id` int(11) NOT NULL,
  109. `id` varchar(36) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '消息id',
  110. `from_user` int(11) NOT NULL DEFAULT '0' COMMENT '发送者',
  111. `to_user` int(11) NOT NULL DEFAULT '0' COMMENT '接受收者',
  112. `content` text COLLATE utf8mb4_unicode_ci COMMENT '消息内容,如果为文件或图片就是url',
  113. `chat_identify` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '标识 :a与b聊天,b与a聊天。记录 a-b',
  114. `type` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'text' COMMENT '消息类型:text、file、image...',
  115. `is_group` tinyint(1) NOT NULL DEFAULT '0' COMMENT '群聊消息',
  116. `is_read` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否阅读',
  117. `is_last` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否是最后一条消息',
  118. `create_time` int(13) NOT NULL DEFAULT '0' COMMENT '发送时间',
  119. `is_undo` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否撤回',
  120. `at` text COLLATE utf8mb4_unicode_ci COMMENT '提醒某人',
  121. `pid` int(11) DEFAULT '0' COMMENT '引用id',
  122. `file_id` int(11) NOT NULL DEFAULT '0' COMMENT '文件id',
  123. `file_cate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '文件类型',
  124. `file_size` int(11) NOT NULL DEFAULT '0' COMMENT '文件大小',
  125. `file_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文件名称',
  126. `extends` json DEFAULT NULL COMMENT '消息扩展内容',
  127. `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  128. `del_user` text COLLATE utf8mb4_unicode_ci COMMENT '已删除成员'
  129. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  130. -- --------------------------------------------------------
  131. --
  132. -- 表的结构 `yu_emoji`
  133. --
  134. CREATE TABLE `yu_emoji` (
  135. `id` int(11) NOT NULL,
  136. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户id,0为系统',
  137. `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '类型',
  138. `name` varchar(255) DEFAULT NULL COMMENT '名称',
  139. `src` varchar(255) DEFAULT NULL COMMENT '链接',
  140. `file_id` INT(11) NOT NULL DEFAULT '0' COMMENT '文件id',
  141. `create_time` int(11) NOT NULL DEFAULT '0',
  142. `update_time` int(11) NOT NULL DEFAULT '0',
  143. `delete_time` int(11) NOT NULL DEFAULT '0',
  144. `status` tinyint(1) NOT NULL DEFAULT '1'
  145. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='表情表';
  146. --
  147. -- 表的结构 `yu_user`
  148. --
  149. CREATE TABLE `yu_user` (
  150. `user_id` int(11) NOT NULL,
  151. `account` char(32) COLLATE utf8mb4_unicode_ci NOT NULL,
  152. `realname` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  153. `password` char(32) COLLATE utf8mb4_unicode_ci NOT NULL,
  154. `salt` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '加密盐',
  155. `avatar` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '头像',
  156. `email` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '电子邮箱',
  157. `sex` tinyint(1) NOT NULL DEFAULT '2' COMMENT '性别,0女,1男,2未知',
  158. `role` tinyint(1) NOT NULL DEFAULT '0' COMMENT '角色,0无角色,1超管,2普管',
  159. `motto` text COLLATE utf8mb4_unicode_ci COMMENT '个性签名',
  160. `remark` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '备注',
  161. `name_py` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '名字的拼音',
  162. `cs_uid` int(11) NOT NULL DEFAULT '0' COMMENT '客服ID',
  163. `setting` json DEFAULT NULL COMMENT '用户设置',
  164. `friend_limit` int(11) NOT NULL DEFAULT '0' COMMENT '好友上限',
  165. `group_limit` int(11) NOT NULL DEFAULT '0' COMMENT '群聊上限',
  166. `create_time` int(11) UNSIGNED NOT NULL COMMENT '创建时间',
  167. `update_time` int(11) UNSIGNED DEFAULT NULL,
  168. `login_count` mediumint(8) UNSIGNED DEFAULT '0' COMMENT '登录次数',
  169. `is_auth` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否认证',
  170. `last_login_time` int(11) UNSIGNED DEFAULT '0' COMMENT '最后登录时间',
  171. `last_login_ip` char(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '最后登录Ip\n',
  172. `register_ip` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '注册IP',
  173. `delete_time` int(11) UNSIGNED NOT NULL DEFAULT '0',
  174. `status` tinyint(1) UNSIGNED DEFAULT '1'
  175. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT;
  176. --
  177. -- 转存表中的数据 `yu_user`
  178. --
  179. INSERT INTO `yu_user` (`user_id`, `account`, `realname`, `password`, `salt`, `avatar`, `email`, `sex`, `role`, `motto`, `remark`, `name_py`, `cs_uid`, `setting`, `friend_limit`, `group_limit`, `create_time`, `update_time`, `login_count`, `is_auth`, `last_login_time`, `last_login_ip`, `register_ip`, `delete_time`, `status`) VALUES
  180. (1, 'administrator', '管理员', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'service@kais.com', 1, 1, NULL, '', 'guanliyuan', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"false\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1222907803, 1702625051, 300, 0, 1730704229, '171.212.121.209', NULL, 0, 1),
  181. (2, '13800000002', '熊大', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'lllll@bchn', 2, 0, '我是测试', '', 'xiongda', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"true\", \"hideMessageTime\": \"true\"}', 0, 0, 1555341865, 1730171777, 14886, 0, 1730704870, '125.80.141.99', NULL, 0, 1),
  182. (3, '13800000003', '熊二', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, '12345@qq.com', 0, 0, '', '', 'xionger', 0, '{\"theme\": \"blue\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"false\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1557933999, 1728161315, 1217, 0, 1730697701, '103.121.164.134', NULL, 0, 1),
  183. (4, '13800000004', '喜洋洋', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'xiyangyang@qq.com', 1, 0, '', '', 'xiyangyang', 0, '{\"theme\": \"blue\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"true\", \"hideMessageTime\": \"true\"}', 0, 0, 1604587165, 1730142085, 834, 0, 1730643800, '180.91.180.120', NULL, 0, 1),
  184. (5, '13800000005', '灰太狼', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'huitailang@qq.com', 1, 0, NULL, '', 'huitailang', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"true\", \"hideMessageTime\": \"true\"}', 0, 0, 1604587246, 1711360067, 859, 0, 1730692491, '1.199.39.24', NULL, 0, 1),
  185. (6, '13800000006', '奥特曼', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'aoteman@qq.com', 1, 0, '', '', 'aoteman', 0, '{\"theme\": \"blue\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"true\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587295, 1729431591, 824, 0, 1730688234, '120.224.39.54', NULL, 0, 1),
  186. (7, '13800000007', '孙悟空', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'sunwukong@qq.com', 1, 0, '', '', 'sunwukong', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"false\", \"hideMessageName\": \"true\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587347, 1728972288, 761, 0, 1730703214, '115.60.18.127', NULL, 0, 1),
  187. (8, '13800000008', '猪八戒', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'zhubajie@qq.com', 1, 0, '', '', 'zhubajie', 0, '{\"theme\": \"default\", \"isVoice\": \"false\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"true\"}', 0, 0, 1604587378, 1726480311, 894, 0, 1730705108, '120.211.148.44', NULL, 0, 1),
  188. (9, '13800000009', '唐三藏', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'tangsanzang@qq.com', 0, 0, '', '', 'tangsanzang', 0, '{\"theme\": \"blue\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587409, 1723078304, 1147, 0, 1730462811, '120.228.7.21', NULL, 0, 1),
  189. (10, '13800000010', '沙悟净', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'sss', 2, 0, '', '', 'shawujing', 0, '{\"theme\": \"blue\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"true\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587409, 1727523988, 818, 0, 1730689889, '120.224.39.54', NULL, 0, 1),
  190. (11, '13800000011', '刘备', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'liubei@kaishanlaw.com', 1, 0, '', '', 'hongbaolai', 0, '{\"theme\": \"blue\", \"isVoice\": \"true\", \"sendKey\": \"2\", \"avatarCricle\": \"false\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1555341865, 1724836138, 861, 0, 1730703374, '115.60.18.127', NULL, 0, 1),
  191. (12, '13800000012', '关羽', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'gggg', 1, 0, '', '', 'guanyu', 0, '{\"theme\": \"blue\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"false\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1557933999, 1730285557, 781, 0, 1730686560, '120.224.39.54', NULL, 0, 1),
  192. (13, '13800000013', '张飞', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'i', 1, 0, '', '', 'zhangfei', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"false\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587165, 1729275843, 641, 0, 1730702978, '115.60.18.127', NULL, 0, 1),
  193. (14, '13800000014', '赵云', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', '', 'zhaoyun@qq.com', 1, 0, '', '', 'zhaoyun', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"true\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587246, 1730374373, 662, 0, 1730688783, '124.135.239.79', NULL, 0, 1),
  194. (15, '13800000015', '曹操', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'caocao@qq.com', 1, 0, '', '', 'caocao', 0, '{\"theme\": \"blue\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587295, 1720255912, 800, 0, 1730703843, '220.173.180.106', NULL, 0, 1),
  195. (16, '13800000016', '司马懿', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'simayi@qq.com', 2, 0, '', '', 'simayi', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587347, 1711527030, 781, 0, 1730703600, '218.57.140.131', NULL, 0, 1),
  196. (17, '13800000017', '孙权', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'sunquan@qq.com', 1, 0, 'fv', '', 'sunquan', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"true\", \"hideMessageTime\": \"true\"}', 0, 0, 1604587378, 1714396067, 713, 0, 1730598894, '39.148.72.199', NULL, 0, 1),
  197. (18, '13800000018', '周瑜', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'zhouyu@qq.com', 1, 0, '12121', '', 'zhouyu', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587409, 1714437700, 786, 0, 1730700668, '222.71.91.18', NULL, 0, 1),
  198. (19, '13800000019', '诸葛亮', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'zhugeliang@qq.com', 0, 0, '', '', 'zhugeliang', 0, '{\"theme\": \"blue\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"false\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587378, 1730705058, 883, 0, 1730688482, '222.212.4.43', NULL, 0, 1),
  199. (20, '13800000020', '吕布', '2cb4ecb7fd5295685e275edc7d44e02e', 'srww', NULL, 'lvbu@qq.com', 0, 0, '', '', 'lvbu', 0, '{\"theme\": \"default\", \"isVoice\": \"true\", \"sendKey\": \"1\", \"avatarCricle\": \"true\", \"hideMessageName\": \"false\", \"hideMessageTime\": \"false\"}', 0, 0, 1604587409, 1729935411, 1750, 0, 1730014387, '101.44.83.192', NULL, 0, 1);
  200. CREATE TABLE `yu_chat_delog` (
  201. `id` int(11) NOT NULL,
  202. `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
  203. `to_user` varchar(32) DEFAULT NULL COMMENT '删除对象',
  204. `is_group` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否群聊',
  205. `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
  206. `delete_time` int(11) NOT NULL DEFAULT '0' COMMENT '删除时间'
  207. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='会话删除表';
  208. --
  209. -- 转储表的索引
  210. --
  211. --
  212. -- 表的索引 `yu_chat_delog`
  213. --
  214. ALTER TABLE `yu_chat_delog`
  215. ADD PRIMARY KEY (`id`);
  216. --
  217. -- 使用表AUTO_INCREMENT `yu_chat_delog`
  218. --
  219. ALTER TABLE `yu_chat_delog`
  220. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  221. COMMIT;
  222. --
  223. -- 表的索引 `yu_config`
  224. --
  225. ALTER TABLE `yu_config`
  226. ADD PRIMARY KEY (`id`);
  227. --
  228. -- 表的索引 `yu_file`
  229. --
  230. ALTER TABLE `yu_file`
  231. ADD PRIMARY KEY (`file_id`);
  232. --
  233. -- 表的索引 `yu_friend`
  234. --
  235. ALTER TABLE `yu_friend`
  236. ADD PRIMARY KEY (`friend_id`);
  237. --
  238. -- 表的索引 `yu_group`
  239. --
  240. ALTER TABLE `yu_group`
  241. ADD PRIMARY KEY (`group_id`);
  242. --
  243. -- 表的索引 `yu_group_user`
  244. --
  245. ALTER TABLE `yu_group_user`
  246. ADD PRIMARY KEY (`id`);
  247. --
  248. -- 表的索引 `yu_message`
  249. --
  250. ALTER TABLE `yu_message`
  251. ADD PRIMARY KEY (`msg_id`);
  252. --
  253. -- 表的索引 `yu_emoji`
  254. --
  255. ALTER TABLE `yu_emoji`
  256. ADD PRIMARY KEY (`id`);
  257. --
  258. -- 表的索引 `yu_user`
  259. --
  260. ALTER TABLE `yu_user`
  261. ADD PRIMARY KEY (`user_id`),
  262. ADD UNIQUE KEY `account` (`account`) USING BTREE,
  263. ADD KEY `accountpassword` (`account`,`password`);
  264. --
  265. -- 在导出的表使用AUTO_INCREMENT
  266. --
  267. --
  268. -- 使用表AUTO_INCREMENT `yu_config`
  269. --
  270. ALTER TABLE `yu_config`
  271. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  272. --
  273. -- 使用表AUTO_INCREMENT `yu_file`
  274. --
  275. ALTER TABLE `yu_file`
  276. MODIFY `file_id` int(11) NOT NULL AUTO_INCREMENT;
  277. --
  278. -- 使用表AUTO_INCREMENT `yu_friend`
  279. --
  280. ALTER TABLE `yu_friend`
  281. MODIFY `friend_id` int(11) NOT NULL AUTO_INCREMENT;
  282. --
  283. -- 使用表AUTO_INCREMENT `yu_group`
  284. --
  285. ALTER TABLE `yu_group`
  286. MODIFY `group_id` int(11) NOT NULL AUTO_INCREMENT;
  287. --
  288. -- 使用表AUTO_INCREMENT `yu_group_user`
  289. --
  290. ALTER TABLE `yu_group_user`
  291. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  292. --
  293. -- 使用表AUTO_INCREMENT `yu_message`
  294. --
  295. ALTER TABLE `yu_message`
  296. MODIFY `msg_id` int(11) NOT NULL AUTO_INCREMENT;
  297. --
  298. -- 使用表AUTO_INCREMENT `yu_emoji`
  299. --
  300. ALTER TABLE `yu_emoji`
  301. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
  302. ALTER TABLE `yu_message` ADD INDEX( `from_user`, `to_user`, `is_group`, `is_read`);
  303. ALTER TABLE `yu_message` ADD INDEX( `from_user`, `to_user`, `is_group`, `is_last`);
  304. ALTER TABLE `yu_message` ADD INDEX( `from_user`, `is_group`, `is_last`);
  305. ALTER TABLE `yu_message` ADD INDEX( `to_user`, `is_group`, `is_last`);
  306. ALTER TABLE `yu_message` ADD INDEX( `chat_identify`);
  307. ALTER TABLE `yu_message` ADD INDEX( `chat_identify`, `is_last`);
  308. ALTER TABLE `yu_message` ADD INDEX( `chat_identify`, `status`);
  309. ALTER TABLE `yu_group_user` ADD INDEX( `group_id`, `status`);
  310. ALTER TABLE `yu_group_user` ADD INDEX( `group_id`, `user_id`);
  311. ALTER TABLE `yu_group_user` ADD INDEX( `group_id`, `user_id`, `status`);
  312. ALTER TABLE `yu_friend` ADD INDEX( `friend_user_id`, `create_user`);
  313. ALTER TABLE `yu_friend` ADD INDEX( `friend_user_id`, `create_user`, `status`);
  314. ALTER TABLE `yu_friend` ADD INDEX( `create_user`, `status`);
  315. ALTER TABLE `yu_friend` ADD INDEX( `create_user`);
  316. ALTER TABLE `yu_chat_delog` ADD INDEX( `user_id`, `is_group`);
  317. --
  318. -- 使用表AUTO_INCREMENT `yu_user`
  319. --
  320. ALTER TABLE `yu_user`
  321. MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
  322. COMMIT;