From d6d1512b84fccd9406c6717a956701d5ba4d268a Mon Sep 17 00:00:00 2001 From: yubinCloud Date: Thu, 29 Apr 2021 22:20:13 +0800 Subject: [PATCH] =?UTF-8?q?11-3=20=E5=AE=8C=E6=88=90=E7=94=B5=E5=AD=90?= =?UTF-8?q?=E4=B9=A6=E5=BF=AB=E7=85=A7=E8=A1=A8=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql-scripts/create_tables.sql | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sql-scripts/create_tables.sql b/sql-scripts/create_tables.sql index bc2d420..ecad517 100644 --- a/sql-scripts/create_tables.sql +++ b/sql-scripts/create_tables.sql @@ -86,4 +86,18 @@ create table `user` ( unique key `login_name_unique` (`login_name`) ) engine=innodb default charset=utf8mb4 comment='用户'; -insert into `user` (id, `login_name`, `name`, `password`) values (1, 'test', '测试', 'e70e2222a9d67c4f2eae107533359aa4'); \ No newline at end of file +insert into `user` (id, `login_name`, `name`, `password`) values (1, 'test', '测试', 'e70e2222a9d67c4f2eae107533359aa4'); + +-- 电子书快照表 +drop table if exists `ebook_snapshot`; +create table `ebook_snapshot` ( + `id` bigint auto_increment not null comment 'id', + `ebook_id` bigint not null default 0 comment '电子书id', + `date` date not null comment '快照日期', + `view_count` int not null default 0 comment '阅读数', + `vote_count` int not null default 0 comment '点赞数', + `view_increase` int not null default 0 comment '阅读增长', + `vote_increase` int not null default 0 comment '点赞增长', + primary key (`id`), + unique key `ebook_id_date_unique` (`ebook_id`, `date`) +) engine=innodb default charset=utf8mb4 comment='电子书快照表'; \ No newline at end of file -- GitLab