/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2019/1/6 16:19:25 */
/*==============================================================*/
drop table if exists novel_bookrack;
drop table if exists novel_info;
drop table if exists novel_page;
drop table if exists novel_type;
drop table if exists novel_user;
/*==============================================================*/
/* Table: novel_bookrack */
/*==============================================================*/
create table novel_bookrack
(
id bigint not null auto_increment,
user_id int,
info_id int,
page_id bigint,
primary key (id)
);
alter table novel_bookrack comment '书架';
/*==============================================================*/
/* Table: novel_info */
/*==============================================================*/
create table novel_info
(
id int not null auto_increment,
name varchar(50) comment '小说名称',
type varchar(50) comment '类型',
authory varchar(50) comment '作者',
detail varchar(400) comment '简介',
count bigint comment '字数',
click bigint comment '点击',
collect bigint comment '收藏',
recommend bigint comment '推荐',
ticket bigint comment '月票',
pages int comment '章节数',
primary key (id)
);
alter table novel_info comment '小说详情';
/*==============================================================*/
/* Table: novel_page */
/*==============================================================*/
create table novel_page
(
id bigint not null auto_increment,
info_id int comment '对应小说',
name varchar(128) comment '章节名称',
count int comment '章节字数',
show_time datetime comment '发布时间',
content text comment '章节内容',
primary key (id)
);
alter table novel_page comment '章节';
/*==============================================================*/
/* Table: novel_type */
/*==============================================================*/
create table novel_type
(
id int not null auto_increment,
name varchar(50),
primary key (id)
);
alter table novel_type comment '分类';
/*==============================================================*/
/* Table: novel_user */
/*==============================================================*/
create table novel_user
(
id int not null auto_increment,
nick_name varchar(50) comment '用户昵称',
avatar_url varchar(128) comment '头像',
gender int comment '性别',
openid varchar(128) comment '开发ID',
money float comment '金额',
level int comment '等级',
primary key (id)
);
alter table novel_user comment '用户';
一键复制
编辑
Web IDE
原始数据
按行查看
历史