CREATE database if NOT EXISTS `novel_plus` default character set utf8mb4 collate utf8mb4_unicode_ci;
use `novel_plus`;
SET NAMES utf8mb4;
-- ----------------------------
-- Table structure for author
-- ----------------------------
DROP TABLE IF EXISTS `author`;
CREATE TABLE `author`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`user_id` bigint(20) DEFAULT NULL COMMENT '用户ID',
`invite_code` varchar(20) DEFAULT NULL COMMENT '邀请码',
`pen_name` varchar(20) DEFAULT NULL COMMENT '笔名',
`tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码',
`chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号',
`email` varchar(50) DEFAULT NULL COMMENT '电子邮箱',
`work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频',
`status` tinyint(4) DEFAULT '0' COMMENT '0:正常,1:封禁',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='作者表';
-- ----------------------------
-- Records of author
-- ----------------------------
INSERT INTO `author`
VALUES ('1', null, 'reerer', 'abc', '13560487656', '23484388', '23484388@qq.com', '0', '0', null);
INSERT INTO `author`
VALUES ('2', '1255060328322027520', 'rwrr445554', '梦入神机', '13560421324', '1179705413', 'reerer@qq.com', '0', '0',
'2020-05-13 14:01:31');
-- ----------------------------
-- Table structure for author_code
-- ----------------------------
DROP TABLE IF EXISTS `author_code`;
CREATE TABLE `author_code`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`invite_code` varchar(100) DEFAULT NULL COMMENT '邀请码',
`validity_time` datetime DEFAULT NULL COMMENT '有效时间',
`is_use` tinyint(1) DEFAULT '0' COMMENT '是否使用过,0:未使用,1:使用过',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人ID',
PRIMARY KEY (`id`),
UNIQUE KEY `key_code` (`invite_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='作家邀请码表';
-- ----------------------------
-- Records of author_code
-- ----------------------------
INSERT INTO `author_code`
VALUES ('3', 'reerer', '2020-05-27 22:43:45', '1', '2020-05-13 11:40:56', '1');
INSERT INTO `author_code`
VALUES ('4', '123456', '2020-05-28 00:00:00', '0', '2020-05-13 14:09:55', '1');
INSERT INTO `author_code`
VALUES ('5', 'ww34343', '2020-05-21 00:00:00', '0', '2020-05-13 14:18:58', '1');
-- ----------------------------
-- Table structure for book
-- ----------------------------
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频''',
`cat_id` int(11) DEFAULT NULL COMMENT '分类ID',
`cat_name` varchar(50) DEFAULT NULL COMMENT '分类名',
`pic_url` varchar(200) NOT NULL COMMENT '小说封面',
`book_name` varchar(50) NOT NULL COMMENT '小说名',
`author_id` bigint(20) DEFAULT NULL COMMENT '作者id',
`author_name` varchar(50) NOT NULL COMMENT '作者名',
`book_desc` varchar(2000) NOT NULL COMMENT '书籍描述',
`score` float NOT NULL COMMENT '评分,预留字段',
`book_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '书籍状态,0:连载中,1:已完结',
`visit_count` bigint(20) DEFAULT '103' COMMENT '点击量',
`word_count` int(11) DEFAULT NULL COMMENT '总字数',
`comment_count` int(11) DEFAULT '0' COMMENT '评论数',
`last_index_id` bigint(20) DEFAULT NULL COMMENT '最新目录ID',
`last_index_name` varchar(50) DEFAULT NULL COMMENT '最新目录名',
`last_index_update_time` datetime DEFAULT NULL COMMENT '最新目录更新时间',
`is_vip` tinyint(1) DEFAULT '0' COMMENT '是否收费,1:收费,0:免费',
`status` tinyint(1) DEFAULT '0' COMMENT '状态,0:入库,1:上架',
`update_time` datetime NOT NULL COMMENT '更新时间',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`crawl_source_id` int(11) DEFAULT NULL COMMENT '爬虫源站ID',
`crawl_book_id` varchar(32) DEFAULT NULL COMMENT '抓取的源站小说ID',
`crawl_last_time` datetime DEFAULT NULL COMMENT '最后一次的抓取时间',
`crawl_is_stop` tinyint(1) DEFAULT '0' COMMENT '是否已停止更新,0:未停止,1:已停止',
PRIMARY KEY (`id`),
UNIQUE KEY `key_uq_bookName_authorName` (`book_name`,`author_name`) USING BTREE,
KEY `key_lastIndexUpdateTime` (`last_index_update_time`) USING BTREE,
KEY `key_createTime` (`create_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1262260513468559361 DEFAULT CHARSET=utf8mb4 COMMENT='小说表';
-- ----------------------------
-- Records of book
-- ----------------------------
-- ----------------------------
-- Table structure for book_author
-- ----------------------------
DROP TABLE IF EXISTS `book_author`;
CREATE TABLE `book_author`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`invite_code` varchar(20) DEFAULT NULL COMMENT '邀请码',
`pen_name` varchar(20) DEFAULT NULL COMMENT '笔名',
`tel_phone` varchar(20) DEFAULT NULL COMMENT '手机号码',
`chat_account` varchar(50) DEFAULT NULL COMMENT 'QQ或微信账号',
`email` varchar(50) DEFAULT NULL COMMENT '电子邮箱',
`work_direction` tinyint(4) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频',
`status` tinyint(4) DEFAULT NULL COMMENT '0:待审核,1:审核通过,正常,2:审核不通过',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '申请人ID',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1254957873655066625 DEFAULT CHARSET=utf8mb4 COMMENT='作者表';
-- ----------------------------
-- Records of book_author
-- ----------------------------
-- ----------------------------
-- Table structure for book_category
-- ----------------------------
DROP TABLE IF EXISTS `book_category`;
CREATE TABLE `book_category`
(
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`work_direction` tinyint(1) DEFAULT NULL COMMENT '作品方向,0:男频,1:女频''',
`name` varchar(20) NOT NULL COMMENT '分类名',
`sort` tinyint(4) NOT NULL DEFAULT '10' COMMENT '排序',
`create_user_id` bigint(20) DEFAULT NULL,
`create_time` datetime DEFAULT NULL,
`update_user_id` bigint(20) DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='小说类别表';
-- ----------------------------
-- Records of book_category
-- ----------------------------
INSERT INTO `book_category`
VALUES ('1', '0', '玄幻奇幻', '10', null, null, null, null);
INSERT INTO `book_category`
VALUES ('2', '0', '武侠仙侠', '11', null, null, null, null);
INSERT INTO `book_category`
VALUES ('3', '0', '都市言情', '12', null, null, null, null);
INSERT INTO `book_category`
VALUES ('4', '0', '历史军事', '13', null, null, null, null);
INSERT INTO `book_category`
VALUES ('5', '0', '科幻灵异', '14', null, null, null, null);
本文地址:https://sicmodule.kub2b.com/tnews/4069.html
企库往 https://sicmodule.kub2b.com/ , 查看更多