数据表的字段脚本如下:
create table ebook
(
id bigint not null comment 'id’
primary key,
name varchar(50) null comment ‘名称’,
category1_id bigint null comment ‘分类1’,
category2_id bigint null comment ‘分类2’,
description varchar(200) null comment ‘描述’,
cover varchar(200) null comment ‘封面’,
doc_count int default 0 not null comment ‘文档数’,
view_count int default 0 not null comment ‘阅读数’,
vote_count int default 0 not null comment ‘点赞数’
)
comment ‘电子书’ charset = utf8mb4;