代码拉取完成,页面将自动刷新
同步操作将从 bule/ws-chat 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80031
Source Host : localhost:3306
Source Schema : ws-chat
Target Server Type : MySQL
Target Server Version : 80031
File Encoding : 65001
Date: 15/12/2023 17:13:35
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for apply
-- ----------------------------
DROP TABLE IF EXISTS `apply`;
CREATE TABLE `apply` (
`id` int(0) NOT NULL AUTO_INCREMENT,
`send_id` int(0) NOT NULL COMMENT '用户id',
`receiver_id` int(0) NOT NULL COMMENT '发送用户id',
`is_group` int(0) NULL DEFAULT 2 COMMENT '是否是群申请',
`status` int(0) NULL DEFAULT 0 COMMENT '状态 1:同意 2:拒绝',
`create_time` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_as_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for friend
-- ----------------------------
DROP TABLE IF EXISTS `friend`;
CREATE TABLE `friend` (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(0) NULL DEFAULT NULL COMMENT '用户id',
`friend_id` int(0) NULL DEFAULT NULL COMMENT '好友id',
`state` int(0) NULL DEFAULT 1 COMMENT '关系状态 1:正常 0:拉黑',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_as_ci COMMENT = '好友表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for group_member
-- ----------------------------
DROP TABLE IF EXISTS `group_member`;
CREATE TABLE `group_member` (
`id` int(0) NOT NULL COMMENT '主键',
`group_id` int(0) NOT NULL COMMENT '群id',
`member_id` int(0) NULL DEFAULT NULL COMMENT '成员id',
`state` int(0) NULL DEFAULT NULL COMMENT '成员身份 0:普通 1:管理 2:群主',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_as_ci COMMENT = '群成员' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for groups
-- ----------------------------
DROP TABLE IF EXISTS `groups`;
CREATE TABLE `groups` (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT '群名称',
`member_num` int(0) NULL DEFAULT NULL COMMENT '群人数',
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT '群头像',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_as_ci COMMENT = '群' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for message
-- ----------------------------
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message` (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
`sender_id` int(0) NOT NULL COMMENT '发送用户id',
`receiver_id` int(0) NOT NULL COMMENT '接收用户id,群聊时即群id',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NOT NULL COMMENT '内容',
`type` int(0) NOT NULL DEFAULT 0 COMMENT '消息类型(文本、图片、视频等)',
`status` int(0) NOT NULL DEFAULT 0 COMMENT '接收状态(已读、未读等)',
`create_time` datetime(0) NOT NULL COMMENT '发送时间',
`is_group` int(0) NULL DEFAULT NULL COMMENT '是否群聊 1:单聊 2:群聊',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_as_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for music
-- ----------------------------
DROP TABLE IF EXISTS `music`;
CREATE TABLE `music` (
`id` int(0) NOT NULL COMMENT '主键',
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT '音乐名',
`author` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT '作者',
`url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT 'mp3地址',
`cover_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT '封面图地址',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_as_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for session
-- ----------------------------
DROP TABLE IF EXISTS `session`;
CREATE TABLE `session` (
`id` int(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` int(0) NOT NULL COMMENT '用户id',
`session_id` int(0) NOT NULL COMMENT '对方用户id 群会话时则是群id',
`type` int(0) NOT NULL COMMENT '会话类型 1 单聊 2群聊',
`last_message` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL COMMENT '最后消息',
`last_time` datetime(0) NULL DEFAULT NULL COMMENT '最后消息发送时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_as_ci COMMENT = '会话表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(0) NOT NULL COMMENT '主键',
`nickname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT '用户昵称',
`login_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT '登录用户名',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT '密码',
`state` int(0) NULL DEFAULT NULL COMMENT '在线状态',
`avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NULL DEFAULT NULL COMMENT '用户头像',
`create_time` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_as_ci COMMENT = 'state' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。