-
Notifications
You must be signed in to change notification settings - Fork 1
/
timemachine.sql
111 lines (102 loc) · 3.94 KB
/
timemachine.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
Navicat Premium Data Transfer
Source Server : 本地
Source Server Type : MySQL
Source Server Version : 50149
Source Host : localhost:3306
Source Schema : timemachine
Target Server Type : MySQL
Target Server Version : 50149
File Encoding : 65001
Date: 28/10/2018 09:19:28
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for time
-- ----------------------------
DROP TABLE IF EXISTS `time`;
CREATE TABLE `time` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`userId` INT(11) NULL DEFAULT NULL,
`imgUrl` VARCHAR(255)
CHARACTER SET utf8
COLLATE utf8_general_ci NULL DEFAULT NULL,
`content` VARCHAR(140)
CHARACTER SET utf8
COLLATE utf8_general_ci NULL DEFAULT NULL,
`longitude` DOUBLE(255, 0) NULL DEFAULT NULL,
`latitude` DOUBLE(255, 0) NULL DEFAULT NULL,
`location` VARCHAR(255)
CHARACTER SET utf8
COLLATE utf8_general_ci NULL DEFAULT NULL,
`createTime` BIGINT(20) NULL DEFAULT NULL,
`updateTime` BIGINT(20) NULL DEFAULT NULL,
`praiseNum` INT(11) NULL DEFAULT NULL,
`checkStatus` TINYINT(1) NULL DEFAULT NULL,
`visible` TINYINT(1) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
)
ENGINE = InnoDB
AUTO_INCREMENT = 3997
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = COMPACT;
-- ----------------------------
-- Table structure for time_collection
-- ----------------------------
DROP TABLE IF EXISTS `time_collection`;
CREATE TABLE `time_collection` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userId` int(11) NULL DEFAULT NULL,
`timeId` int(11) NULL DEFAULT NULL,
`createTime` bigint(20) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
)
ENGINE = InnoDB
AUTO_INCREMENT = 13
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = COMPACT;
-- ----------------------------
-- Table structure for time_praise
-- ----------------------------
DROP TABLE IF EXISTS `time_praise`;
CREATE TABLE `time_praise` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`userId` INT(11) NULL DEFAULT NULL,
`timeId` INT(11) NULL DEFAULT NULL,
`createTime` bigint(20) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
)
ENGINE = InnoDB
AUTO_INCREMENT = 14
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = COMPACT;
-- ----------------------------
-- Table structure for wechat_user
-- ----------------------------
DROP TABLE IF EXISTS `wechat_user`;
CREATE TABLE `wechat_user` (
`userId` int(11) NOT NULL AUTO_INCREMENT,
`openId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`nickName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`gender` int(11) NULL DEFAULT NULL,
`avatarUrl` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`country` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`province` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`language` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`createTime` bigint(20) NULL DEFAULT NULL,
`sessionId` VARCHAR(255)
CHARACTER SET utf8
COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`userId`) USING BTREE
)
ENGINE = InnoDB
AUTO_INCREMENT = 5
CHARACTER SET = utf8
COLLATE = utf8_general_ci
ROW_FORMAT = COMPACT;
SET FOREIGN_KEY_CHECKS = 1;