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
|
;
;
; ; ; ; CREATE DATABASE `Layui_Blog` ;
USE `Layui_Blog`;
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` ( `id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `name` varchar(512) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题', `content` text COLLATE utf8mb4_unicode_ci COMMENT '内容描述', `summary` text COLLATE utf8mb4_unicode_ci, `icon` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '图标', `post_count` int(11) unsigned DEFAULT '0' COMMENT '该分类的内容数量', `order_num` int(11) DEFAULT NULL COMMENT '排序编码', `parent_id` bigint(32) unsigned DEFAULT NULL COMMENT '父级分类的ID', `meta_keywords` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO关键字', `meta_description` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'SEO描述内容', `created` datetime DEFAULT NULL COMMENT '创建日期', `modified` datetime DEFAULT NULL, `status` tinyint(2) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
insert into `category`(`id`,`name`,`content`,`summary`,`icon`,`post_count`,`order_num`,`parent_id`,`meta_keywords`,`meta_description`,`created`,`modified`,`status`) values (1,'Java 学习',NULL,NULL,NULL,8,NULL,NULL,NULL,NULL,'2020-04-28 22:36:48',NULL,0),(2,'数据结构与算法',NULL,NULL,NULL,5,NULL,NULL,NULL,NULL,'2020-04-28 22:36:48',NULL,0),(3,'数据库',NULL,NULL,NULL,3,NULL,NULL,NULL,NULL,'2020-04-28 22:36:48',NULL,0),(4,'计算机网络',NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,'2020-04-28 22:36:48',NULL,0),(5,'教程工具',NULL,NULL,NULL,6,NULL,NULL,NULL,NULL,'2020-04-28 22:36:48',NULL,0),(6,'前端知识',NULL,NULL,NULL,5,NULL,NULL,NULL,NULL,'2020-04-28 22:36:48',NULL,0);
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` ( `id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '评论的内容', `parent_id` bigint(32) DEFAULT NULL COMMENT '回复的评论ID', `post_id` bigint(32) NOT NULL COMMENT '评论的内容ID', `user_id` bigint(32) NOT NULL COMMENT '评论的用户ID', `vote_up` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '“顶”的数量', `vote_down` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '“踩”的数量', `level` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '置顶等级', `status` tinyint(2) DEFAULT NULL COMMENT '评论的状态', `created` datetime NOT NULL COMMENT '评论的时间', `modified` datetime DEFAULT NULL COMMENT '评论的更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
insert into `comment`(`id`,`content`,`parent_id`,`post_id`,`user_id`,`vote_up`,`vote_down`,`level`,`status`,`created`,`modified`) values (1,' 盗将行\r\n盗将行,何以停,枕风宿雪独自迎;\r\n红昭愿,情人念,隔却山海几时恋;\r\n落花情,心难平,一种相思花飘零;\r\n对黄昏,泪滚滚,骗过天下笑昆仑;\r\n多情岸,怎相盼,饮马长川痴情叹!',1,1,1,1,0,0,1,'2020-07-16 00:00:00',NULL);
DROP TABLE IF EXISTS `post`;
CREATE TABLE `post` ( `id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `title` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标题', `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '内容', `edit_mode` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '编辑模式:html可视化,markdown ..', `category_id` bigint(32) DEFAULT NULL, `user_id` bigint(32) DEFAULT NULL COMMENT '用户ID', `vote_up` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '支持人数', `vote_down` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '反对人数', `view_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '访问量', `comment_count` int(11) NOT NULL DEFAULT '0' COMMENT '评论数量', `recommend` tinyint(1) DEFAULT NULL COMMENT '是否为精华', `level` tinyint(2) NOT NULL DEFAULT '0' COMMENT '置顶等级', `status` tinyint(2) DEFAULT NULL COMMENT '状态', `created` datetime DEFAULT NULL COMMENT '创建日期', `modified` datetime DEFAULT NULL COMMENT '最后更新日期', `avatar` varchar(256) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
insert into `post`(`id`,`title`,`content`,`edit_mode`,`category_id`,`user_id`,`vote_up`,`vote_down`,`view_count`,`comment_count`,`recommend`,`level`,`status`,`created`,`modified`,`avatar`) values (1,'算法入门教程',' 你有多久没好好学习一个开源项目了?\n\n你是否经常为找不到好的开源项目而烦恼?\n\n你是否为不知道怎么入手去看一个开源项目?\n\n你是否想看别人的项目学习笔记?\n\n你是否想跟着别人的项目搭建过程一步一步跟着做项目?\n\n为了让更多Java的开发者能更容易找到值得学习的开源项目,我搭建了这个Java开源学习网站,宗旨梳理Java知识,共享开源项目笔记。来瞧一瞧:\n\nimg[//image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/20200414/473f73a3eb6f471e8154620a9c1d5306.png] \n\n网站截图中可以看出,点击筛选条件组合之后,再点击搜索就会搜索出对应的开源项目。\n\n比如打开renren-fast项目,可以看到具体项目的信息,以及模块解析。\n\nimg[//image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/20200414/f74740692dab4d9c937cd56336ead1b4.png]\n\n这样,学习一个开源项目就不再费劲,每天学习一个开源项目,在不知不觉中提升技术水平!目前网站已经收录了近100个开源项目,让Java不再难懂!\n\n直接扫公众号下方的二维码,回复关键字【网站】即可获得网站的域名地址!\n\nimg[//image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/20200414/f58f7c6d038c4dfb99bd9cf40935392e.png]\n\n关注上方的公众号二维码\n\n回复【网站】即可获取项目域名地址。\n','0',2,1,0,0,15,0,1,1,NULL,'2020-04-28 14:41:41','2020-04-28 14:41:41','/res/images/avatar/5.jpg'),(2,'Spring Boot 入门教程',' 盗将行\r\n盗将行,何以停,枕风宿雪独自迎;\r\n红昭愿,情人念,隔却山海几时恋;\r\n落花情,心难平,一种相思花飘零;\r\n对黄昏,泪滚滚,骗过天下笑昆仑;\r\n多情岸,怎相盼,饮马长川痴情叹!','0',1,1,0,0,22,0,1,1,NULL,'2020-04-28 14:55:16','2020-04-28 14:55:16','/res/images/avatar/5.jpg'),(3,'从 0 开始搭建 Hexo 博客',' 你有多久没好好学习一个开源项目了?\r\n\r\n你是否经常为找不到好的开源项目而烦恼?\r\n\r\n你是否为不知道怎么入手去看一个开源项目?\r\n\r\n你是否想看别人的项目学习笔记?\r\n\r\n你是否想跟着别人的项目搭建过程一步一步跟着做项目?\r\n\r\n为了让更多Java的开发者能更容易找到值得学习的开源项目,我搭建了这个Java开源学习网站,宗旨梳理Java知识,共享开源项目笔记。来瞧一瞧:\r\n\r\nimg[//image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/20200414/473f73a3eb6f471e8154620a9c1d5306.png] \r\n\r\n网站截图中可以看出,点击筛选条件组合之后,再点击搜索就会搜索出对应的开源项目。\r\n\r\n比如打开renren-fast项目,可以看到具体项目的信息,以及模块解析。\r\n\r\nimg[//image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/20200414/f74740692dab4d9c937cd56336ead1b4.png]\r\n\r\n这样,学习一个开源项目就不再费劲,每天学习一个开源项目,在不知不觉中提升技术水平!目前网站已经收录了近100个开源项目,让Java不再难懂!\r\n\r\n直接扫公众号下方的二维码,回复关键字【网站】即可获得网站的域名地址!\r\n\r\nimg[//image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/20200414/f58f7c6d038c4dfb99bd9cf40935392e.png]\r\n\r\n关注上方的公众号二维码\r\n\r\n回复【网站】即可获取项目域名地址。\r\n','0',5,1,0,0,14,0,0,0,NULL,'2020-04-28 14:55:48','2020-04-28 14:55:48','/res/images/avatar/5.jpg'),(4,'Redis 入门教程',' 你有多久没好好学习一个开源项目了?\r\n\r\n你是否经常为找不到好的开源项目而烦恼?\r\n\r\n你是否为不知道怎么入手去看一个开源项目?\r\n\r\n你是否想看别人的项目学习笔记?\r\n\r\n你是否想跟着别人的项目搭建过程一步一步跟着做项目?\r\n\r\n为了让更多Java的开发者能更容易找到值得学习的开源项目,我搭建了这个Java开源学习网站,宗旨梳理Java知识,共享开源项目笔记。来瞧一瞧:\r\n\r\nimg[//image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/20200414/473f73a3eb6f471e8154620a9c1d5306.png] \r\n\r\n网站截图中可以看出,点击筛选条件组合之后,再点击搜索就会搜索出对应的开源项目。\r\n\r\n比如打开renren-fast项目,可以看到具体项目的信息,以及模块解析。\r\n\r\nimg[//image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/20200414/f74740692dab4d9c937cd56336ead1b4.png]\r\n\r\n这样,学习一个开源项目就不再费劲,每天学习一个开源项目,在不知不觉中提升技术水平!目前网站已经收录了近100个开源项目,让Java不再难懂!\r\n\r\n直接扫公众号下方的二维码,回复关键字【网站】即可获得网站的域名地址!\r\n\r\nimg[//image-1300566513.cos.ap-guangzhou.myqcloud.com/upload/images/20200414/f58f7c6d038c4dfb99bd9cf40935392e.png]\r\n\r\n关注上方的公众号二维码\r\n\r\n回复【网站】即可获取项目域名地址。\r\n','0',3,1,0,0,0,0,NULL,0,NULL,'2020-07-17 00:00:00','2020-07-17 00:00:00','/res/images/avatar/5.jpg'),(5,'计算机网络入门教程','计算机网络入门……','0',4,1,0,0,0,0,NULL,0,NULL,'2020-07-18 00:00:00','2020-07-18 00:00:00','/res/images/avatar/5.jpg'),(6,'HTML 入门教程','HTML 入门……','0',6,1,0,0,0,0,NULL,0,NULL,'2020-07-19 00:00:00','2020-07-19 00:00:00','/res/images/avatar/5.jpg');
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` ( `id` bigint(32) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `username` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称', `password` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密码', `email` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '邮件', `mobile` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '手机电话', `point` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '积分', `sign` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '个性签名', `gender` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '性别', `wechat` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '微信号', `vip_level` int(32) DEFAULT NULL COMMENT 'vip等级', `birthday` datetime DEFAULT NULL COMMENT '生日', `avatar` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '头像', `post_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '内容数量', `comment_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '评论数量', `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态', `lasted` datetime DEFAULT NULL COMMENT '最后的登陆时间', `created` datetime NOT NULL COMMENT '创建日期', `modified` datetime DEFAULT NULL COMMENT '最后修改时间', PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`) USING BTREE, UNIQUE KEY `email` (`email`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
insert into `user`(`id`,`username`,`password`,`email`,`mobile`,`point`,`sign`,`gender`,`wechat`,`vip_level`,`birthday`,`avatar`,`post_count`,`comment_count`,`status`,`lasted`,`created`,`modified`) values (1,'guoshizhan','e10adc3949ba59abbe56e057f20f883e','12345678@qq.com',NULL,0,'关注公众号:MarkerHub,一起学Java!!','0',NULL,0,NULL,'/res/images/avatar/5.jpg',0,0,0,'2020-07-20 17:08:30','2020-04-28 14:37:24',NULL),(2,'test007','96e79218965eb72c92a549dd5a330112','1111@qq.com',NULL,0,NULL,'0',NULL,0,NULL,'/res/images/avatar/default.png',0,0,0,NULL,'2020-04-28 14:45:07',NULL),(3,'test004','96e79218965eb72c92a549dd5a330112','144d11@qq.com',NULL,0,NULL,'0',NULL,0,NULL,'/res/images/avatar/default.png',0,0,0,NULL,'2020-04-28 14:48:26',NULL),(4,'test005','96e79218965eb72c92a549dd5a330112','144d15@qq.com',NULL,0,NULL,'0',NULL,0,NULL,'/res/images/avatar/default.png',0,0,0,NULL,'2020-04-28 14:48:26',NULL),(5,'test00756','96e79218965eb72c92a549dd5a330112','45454541@qq.com',NULL,0,NULL,'0',NULL,0,NULL,'/res/images/avatar/default.png',0,0,0,NULL,'2020-04-28 14:53:49',NULL),(6,'guoshizhanddddd','e10adc3949ba59abbe56e057f20f883e','1223233@qq.com',NULL,0,NULL,'0',NULL,0,NULL,'/res/images/avatar/default.png',0,0,0,NULL,'2020-07-18 14:48:04',NULL),(7,'hexueqin','e10adc3949ba59abbe56e057f20f883e','123456@qq.com',NULL,0,'物品,一起学 Java!!','1',NULL,0,NULL,'/res/images/avatar/default.png',0,0,0,'2020-07-19 12:43:59','2020-07-18 22:57:55',NULL);
DROP TABLE IF EXISTS `user_action`;
CREATE TABLE `user_action` ( `id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `user_id` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户ID', `action` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '动作类型', `point` int(11) DEFAULT NULL COMMENT '得分', `post_id` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '关联的帖子ID', `comment_id` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '关联的评论ID', `created` datetime DEFAULT NULL, `modified` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
DROP TABLE IF EXISTS `user_collection`;
CREATE TABLE `user_collection` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL, `post_id` bigint(20) NOT NULL, `post_user_id` bigint(20) NOT NULL, `created` datetime NOT NULL, `modified` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
insert into `user_collection`(`id`,`user_id`,`post_id`,`post_user_id`,`created`,`modified`) values (1,1,1,1,'2020-07-14 00:00:00','2020-07-14 00:00:00'),(2,1,2,1,'2020-07-15 00:00:00','2020-07-15 00:00:00'),(3,1,3,1,'2020-07-15 00:00:00','2020-07-15 00:00:00');
DROP TABLE IF EXISTS `user_message`;
CREATE TABLE `user_message` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `from_user_id` bigint(20) NOT NULL COMMENT '发送消息的用户ID', `to_user_id` bigint(20) NOT NULL COMMENT '接收消息的用户ID', `post_id` bigint(20) DEFAULT NULL COMMENT '消息可能关联的帖子', `comment_id` bigint(20) DEFAULT NULL COMMENT '消息可能关联的评论', `content` text COLLATE utf8mb4_unicode_ci, `type` tinyint(2) DEFAULT NULL COMMENT '消息类型', `created` datetime NOT NULL, `modified` datetime DEFAULT NULL, `status` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
insert into `user_message`(`id`,`from_user_id`,`to_user_id`,`post_id`,`comment_id`,`content`,`type`,`created`,`modified`,`status`) values (1,1,2,1,1,'天上掉下个猪八戒',1,'2020-07-15 00:00:00','2020-07-15 00:00:00',1);
; ; ; ;
|