-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgo-blog.sql
262 lines (241 loc) · 11 KB
/
go-blog.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
/*
Navicat Premium Data Transfer
Source Server : 39.108.104.253
Source Server Type : MySQL
Source Server Version : 50611
Source Host : 39.108.104.253:3306
Source Schema : 5iweb
Target Server Type : MySQL
Target Server Version : 50611
File Encoding : 65001
Date: 25/01/2021 19:01:11
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for blog_auth
-- ----------------------------
DROP TABLE IF EXISTS `blog_auth`;
CREATE TABLE `blog_auth` (
`auth_id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
`auth_name` varchar(20) NOT NULL COMMENT '名称',
`auth_pid` smallint(6) unsigned NOT NULL COMMENT '父id',
`auth_c` varchar(32) NOT NULL DEFAULT '' COMMENT '模块',
`auth_a` varchar(32) NOT NULL DEFAULT '' COMMENT '操作方法',
`auth_path` varchar(32) NOT NULL DEFAULT '' COMMENT '全路径',
`auth_level` tinyint(4) NOT NULL DEFAULT '0' COMMENT '基别',
PRIMARY KEY (`auth_id`)
) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_duanzi
-- ----------------------------
DROP TABLE IF EXISTS `blog_duanzi`;
CREATE TABLE `blog_duanzi` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`add_time` int(11) unsigned NOT NULL DEFAULT '0',
`comment` text,
`oo` int(4) unsigned NOT NULL DEFAULT '0',
`xx` int(4) unsigned NOT NULL DEFAULT '0',
`author` varchar(25) NOT NULL DEFAULT '',
`is_show` enum('展示','不展示') DEFAULT '展示' COMMENT '是否显示',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=85 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_goods
-- ----------------------------
DROP TABLE IF EXISTS `blog_goods`;
CREATE TABLE `blog_goods` (
`goods_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`goods_name` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
`goods_number` smallint(6) NOT NULL DEFAULT '1' COMMENT '浏览数',
`goods_small_logo` char(100) CHARACTER SET utf8 NOT NULL DEFAULT './Home/Public/img/gopher_default.jpg' COMMENT '封面图',
`is_hot` enum('热销','不热销') CHARACTER SET utf8 NOT NULL DEFAULT '不热销' COMMENT '热销与否',
`is_new` enum('新品','不新品') CHARACTER SET utf8 NOT NULL DEFAULT '不新品' COMMENT '新品与否',
`add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
`upd_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
`is_del` enum('删除','不删除') CHARACTER SET utf8 NOT NULL DEFAULT '不删除' COMMENT '是否删除',
`author` varchar(32) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '作者',
`keywords` varchar(300) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '关键字',
`description` varchar(500) DEFAULT NULL,
`cate` char(32) CHARACTER SET utf8 NOT NULL DEFAULT 'Go语言' COMMENT '分类 默认Go语言',
`cat_id` int(2) unsigned NOT NULL DEFAULT '1' COMMENT '展示形式 默认1',
`origin_author` varchar(32) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '原始作者',
`origin_url` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '原始url',
`user_id` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '用户id',
`city` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '未知' COMMENT '城市',
PRIMARY KEY (`goods_id`),
KEY `add_time` (`add_time`),
KEY `uid_gnumber` (`user_id`,`goods_id`),
KEY `uid` (`user_id`),
KEY `gid_cate_gnum` (`goods_id`,`goods_number`,`cate`),
KEY `cate_gid` (`cate`,`goods_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4124 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for blog_goods_introduce
-- ----------------------------
DROP TABLE IF EXISTS `blog_goods_introduce`;
CREATE TABLE `blog_goods_introduce` (
`goods_id` int(10) DEFAULT NULL,
`goods_introduce` mediumtext,
KEY `goods_id` (`goods_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for blog_goods_pics
-- ----------------------------
DROP TABLE IF EXISTS `blog_goods_pics`;
CREATE TABLE `blog_goods_pics` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`goods_id` int(10) unsigned NOT NULL COMMENT '商品',
`pics_big` char(100) NOT NULL DEFAULT '' COMMENT '相册原图',
`pics_small` char(100) NOT NULL DEFAULT '' COMMENT '相册缩略图',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='商品相册表';
-- ----------------------------
-- Table structure for blog_manager
-- ----------------------------
DROP TABLE IF EXISTS `blog_manager`;
CREATE TABLE `blog_manager` (
`mg_id` int(11) NOT NULL AUTO_INCREMENT,
`mg_name` varchar(32) NOT NULL,
`mg_pwd` varchar(32) NOT NULL,
`mg_time` int(10) unsigned NOT NULL COMMENT '时间',
`mg_role_id` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '角色id',
PRIMARY KEY (`mg_id`),
UNIQUE KEY `mg_name` (`mg_name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_ooxx
-- ----------------------------
DROP TABLE IF EXISTS `blog_ooxx`;
CREATE TABLE `blog_ooxx` (
`id` mediumint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`target_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父id',
`target_type` tinyint(4) DEFAULT '1' COMMENT '1:note',
`msg` mediumtext,
`like_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '赞',
`unlike_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '踩',
`from_user` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来自谁',
`to_user` int(11) NOT NULL DEFAULT '0' COMMENT '发送给谁',
`parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '上级id,子评论才有',
`add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=342 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for blog_phonecode
-- ----------------------------
DROP TABLE IF EXISTS `blog_phone_code`;
CREATE TABLE `blog_phone_code` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`phone_num` varchar(11) NOT NULL DEFAULT '',
`code` int(4) unsigned NOT NULL DEFAULT '0',
`result` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=207 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_pic
-- ----------------------------
DROP TABLE IF EXISTS `blog_pic`;
CREATE TABLE `blog_pic` (
`id` mediumint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`author` varchar(225) NOT NULL DEFAULT 'Dee' COMMENT '用户名',
`url` longtext COMMENT 'url',
`oo` int(8) unsigned NOT NULL DEFAULT '0' COMMENT '赞',
`xx` int(8) unsigned NOT NULL DEFAULT '0' COMMENT '踩',
`add_time` int(10) unsigned NOT NULL DEFAULT '1510000000' COMMENT '添加时间',
`type` enum('jpg','gif') DEFAULT 'jpg' COMMENT '图片类型',
`small_pic` text,
`is_show` enum('不展示','展示') DEFAULT '不展示',
`tag` char(10) NOT NULL DEFAULT '无聊图',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=163 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_project
-- ----------------------------
DROP TABLE IF EXISTS `blog_project`;
CREATE TABLE `blog_project` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
`update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
`is_del` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否删除',
`creator_id` int(10) NOT NULL DEFAULT '0' COMMENT '作者',
`desc` varchar(300) NOT NULL DEFAULT '' COMMENT '描述',
`origin_url` varchar(255) NOT NULL DEFAULT '' COMMENT '原始url',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_reply
-- ----------------------------
DROP TABLE IF EXISTS `blog_reply`;
CREATE TABLE `blog_reply` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ooxx_id` int(10) unsigned NOT NULL DEFAULT '0',
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`comment` text,
`com_time` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_role
-- ----------------------------
DROP TABLE IF EXISTS `blog_role`;
CREATE TABLE `blog_role` (
`role_id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
`role_name` varchar(20) NOT NULL COMMENT '角色名称',
`role_auth_ids` varchar(128) NOT NULL DEFAULT '' COMMENT '权限ids,1,2,5',
`role_auth_ac` text COMMENT '模块-操作',
PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_tabs
-- ----------------------------
DROP TABLE IF EXISTS `blog_tabs`;
CREATE TABLE `blog_tabs` (
`id` mediumint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`parent_id` int(2) unsigned NOT NULL DEFAULT '0',
`cate` varchar(32) NOT NULL COMMENT '用户名',
`lv` tinyint(1) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_type
-- ----------------------------
DROP TABLE IF EXISTS `blog_type`;
CREATE TABLE `blog_type` (
`type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`type_name` varchar(32) NOT NULL COMMENT '类型名称',
PRIMARY KEY (`type_id`)
) ENGINE=MyISAM AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 COMMENT='商品类型表';
-- ----------------------------
-- Table structure for blog_url
-- ----------------------------
DROP TABLE IF EXISTS `blog_url`;
CREATE TABLE `blog_url` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`url` varchar(100) NOT NULL DEFAULT '' COMMENT 'url',
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '标题',
`desc` varchar(255) NOT NULL DEFAULT '' COMMENT '简介',
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
`add_time` int(11) NOT NULL DEFAULT '0' COMMENT '时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for blog_users
-- ----------------------------
DROP TABLE IF EXISTS `blog_users`;
CREATE TABLE `blog_users` (
`user_id` int(12) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(32) NOT NULL DEFAULT '' COMMENT '昵称',
`tel` varchar(20) NOT NULL DEFAULT '',
`password` varchar(100) NOT NULL,
`tag_list` text,
`head_img` varchar(255) NOT NULL DEFAULT './Common/Uploads/2018-08-07/5b690555b0a58.png',
`position` varchar(25) NOT NULL DEFAULT '程序猿',
`company` varchar(25) NOT NULL DEFAULT '',
`self_intro` varchar(255) NOT NULL DEFAULT '爱编程,爱Golang!',
`homepage` varchar(255) NOT NULL DEFAULT '',
`t_head_img` varchar(255) NOT NULL DEFAULT './Common/Uploads/2018-08-07/t_5b690555b0a58.png',
PRIMARY KEY (`user_id`),
UNIQUE KEY `unique_phone` (`tel`)
) ENGINE=MyISAM AUTO_INCREMENT=69 DEFAULT CHARSET=utf8;
SET FOREIGN_KEY_CHECKS = 1;