/*
Navicat Premium Data Transfer
Source Server : blog
Source Server Type : MySQL
Source Server Version : 50718
Source Host : cdb-bofjolwg.cd.tencentcdb.com:10073
Source Schema : blog
Target Server Type : MySQL
Target Server Version : 50718
File Encoding : 65001
Date: 22/04/2020 21:04:37
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(10) NOT NULL,
`title` char(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`abstract` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`abstractImageSrc` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`cid` int(11) NOT NULL,
`state` int(1) NOT NULL COMMENT '1发布2草稿3删除',
`hits` int(7) NOT NULL DEFAULT 0 COMMENT '阅读次数',
`createdtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`updatetime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL,
`name` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`createtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`updatetime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for collect
-- ----------------------------
DROP TABLE IF EXISTS `collect`;
CREATE TABLE `collect` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL,
`aid` int(11) NOT NULL,
`status` int(11) NOT NULL,
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`updateTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for comment
-- ----------------------------
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`aid` int(11) NOT NULL COMMENT '绑定文章ID',
`uid` int(11) NOT NULL COMMENT '绑定用户ID',
`content` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`createtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for follow
-- ----------------------------
DROP TABLE IF EXISTS `follow`;
CREATE TABLE `follow` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL,
`follow_id` int(11) NOT NULL,
`createtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`status` int(1) NOT NULL,
`updateTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for love
-- ----------------------------
DROP TABLE IF EXISTS `love`;
CREATE TABLE `love` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`loveid` int(11) NOT NULL COMMENT '对应的作品或评论的id',
`type` int(11) NOT NULL COMMENT '点赞类型 1作品点赞 2 评论点赞',
`status` int(1) NOT NULL COMMENT '无状态0点赞1点砸2',
`uid` int(11) NOT NULL COMMENT '用户id',
`createtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for reply
-- ----------------------------
DROP TABLE IF EXISTS `reply`;
CREATE TABLE `reply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cid` int(11) NOT NULL COMMENT '绑定评论ID',
`reply_id` int(11) NOT NULL COMMENT '回复目标ID',
`content` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`from_userid` int(11) NOT NULL COMMENT '回复用户id',
`to_userid` int(11) NOT NULL COMMENT '目标用户id',
`createtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`username` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '佚名',
`profileSrc` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT 'https://b-gold-cdn.xitu.io/v3/static/img/default-avatar.e30559a.svg',
`personalResume` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
`gender` int(1) NOT NULL DEFAULT 0 COMMENT '女性0男性1保密3',
`email` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`password` char(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
`createdtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
`updateTime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
数据库数据
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 对于一个国家来说,数据库的建设规模、数据库信息量的大小和使用频率已经成为衡量这个国家信息化程度的重要标志。 一、数...
- 快到期末了,现在也要开始复习数据库了。。。。。。数据、数据库、数据库管理系统、数据库系统这4个是数据库的基本概念,...