-
Notifications
You must be signed in to change notification settings - Fork 23
/
muxin-dev.sql
88 lines (76 loc) · 2.81 KB
/
muxin-dev.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
Navicat MariaDB Data Transfer
Source Server : .
Source Server Version : 100122
Source Host : localhost:3306
Source Database : muxin-dev
Target Server Type : MariaDB
Target Server Version : 100122
File Encoding : 65001
Date: 2018-07-07 15:39:42
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for chat_msg
-- ----------------------------
DROP TABLE IF EXISTS `chat_msg`;
CREATE TABLE `chat_msg` (
`id` varchar(64) NOT NULL,
`send_user_id` varchar(64) NOT NULL,
`accept_user_id` varchar(64) NOT NULL,
`msg` varchar(255) NOT NULL,
`sign_flag` int(1) NOT NULL COMMENT '消息是否签收状态\r\n1:签收\r\n0:未签收\r\n',
`create_time` datetime NOT NULL COMMENT '发送请求的事件',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Records of chat_msg
-- ----------------------------
-- ----------------------------
-- Table structure for friends_request
-- ----------------------------
DROP TABLE IF EXISTS `friends_request`;
CREATE TABLE `friends_request` (
`id` varchar(64) NOT NULL,
`send_user_id` varchar(64) NOT NULL,
`accept_user_id` varchar(64) NOT NULL,
`request_date_time` datetime NOT NULL COMMENT '发送请求的事件',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Records of friends_request
-- ----------------------------
-- ----------------------------
-- Table structure for my_friends
-- ----------------------------
DROP TABLE IF EXISTS `my_friends`;
CREATE TABLE `my_friends` (
`id` varchar(64) NOT NULL,
`my_user_id` varchar(64) NOT NULL COMMENT '用户id',
`my_friend_user_id` varchar(64) NOT NULL COMMENT '用户的好友id',
PRIMARY KEY (`id`),
UNIQUE KEY `my_user_id` (`my_user_id`,`my_friend_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Records of my_friends
-- ----------------------------
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` varchar(64) NOT NULL,
`username` varchar(20) NOT NULL COMMENT '用户名,账号,慕信号',
`password` varchar(64) NOT NULL COMMENT '密码',
`face_image` varchar(255) NOT NULL COMMENT '我的头像,如果没有默认给一张',
`face_image_big` varchar(255) NOT NULL,
`nickname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称',
`qrcode` varchar(255) NOT NULL COMMENT '新用户注册后默认后台生成二维码,并且上传到fastdfs',
`cid` varchar(64) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Records of users
-- ----------------------------