forked from iveryang/jfinal-bbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bbs.sql
executable file
·121 lines (107 loc) · 3.98 KB
/
bbs.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
112
113
114
115
116
117
118
119
120
121
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50525
Source Host : localhost:3306
Source Database : bbs
Target Server Type : MYSQL
Target Server Version : 50525
File Encoding : 65001
Date: 2013-05-18 11:22:51
*/
SET FOREIGN_KEY_CHECKS=0;
USE BBS;
-- ----------------------------
-- Table structure for `module`
-- ----------------------------
DROP TABLE IF EXISTS `module`;
CREATE TABLE `module` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL,
`detail` varchar(100) DEFAULT NULL,
`turn` tinyint(2) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of module
-- ----------------------------
INSERT INTO `module` VALUES ('4', '屌丝一起来 ⊙ω⊙', null, '1');
INSERT INTO `module` VALUES ('5', '技术专区 (ΘoΘ)', null, '2');
INSERT INTO `module` VALUES ('6', 'github :)', null, '3');
-- ----------------------------
-- Table structure for `post`
-- ----------------------------
DROP TABLE IF EXISTS `post`;
CREATE TABLE `post` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`topicID` int(11) NOT NULL,
`userID` int(11) NOT NULL DEFAULT '0',
`content` text NOT NULL,
`createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`hasReply` bit(1) NOT NULL DEFAULT b'0',
`updateTime` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of post
-- ----------------------------
INSERT INTO `post` VALUES ('27', '16', '11', '<p>^O^</p>', '2013-05-17 13:04:51', '', null);
-- ----------------------------
-- Table structure for `reply`
-- ----------------------------
DROP TABLE IF EXISTS `reply`;
CREATE TABLE `reply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`topicID` int(11) NOT NULL DEFAULT '1',
`postID` int(11) NOT NULL,
`userID` int(11) NOT NULL DEFAULT '0',
`content` varchar(300) NOT NULL,
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of reply
-- ----------------------------
INSERT INTO `reply` VALUES ('94', '16', '27', '11', '111', '2013-05-18 11:20:34');
-- ----------------------------
-- Table structure for `topic`
-- ----------------------------
DROP TABLE IF EXISTS `topic`;
CREATE TABLE `topic` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userID` int(11) NOT NULL DEFAULT '0',
`moduleID` int(11) NOT NULL,
`postCount` int(11) NOT NULL DEFAULT '1',
`replyCount` int(11) NOT NULL DEFAULT '0',
`pv` int(11) NOT NULL DEFAULT '0',
`content` varchar(60) NOT NULL,
`emotion` tinyint(2) DEFAULT NULL,
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`isNice` bit(1) NOT NULL DEFAULT b'0',
`isUp` bit(1) NOT NULL DEFAULT b'0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of topic
-- ----------------------------
INSERT INTO `topic` VALUES ('16', '11', '4', '1', '0', '9', 'test', null, '2013-05-17 13:04:51', '', '');
-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(20) NOT NULL,
`password` varchar(40) NOT NULL,
`sex` bit(1) NOT NULL DEFAULT b'1',
`email` varchar(30) DEFAULT NULL,
`headImg` varchar(120) DEFAULT 'http://static.tieba.baidu.com/tb/editor/images/ali/ali_008.gif',
`blogUrl` varchar(80) DEFAULT NULL,
`feeling` varchar(300) DEFAULT NULL,
`registDate` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('11', 'admin', 'bfd59291e825b5f2bbf1eb76569f8fe7', '', '[email protected]', 'http://static.tieba.baidu.com/tb/editor/images/ali/ali_008.gif', null, null, '2013-05-17');