feat: attention & redis & async

This commit is contained in:
2022-03-20 22:22:08 +08:00
parent e87d8acb7c
commit 58eb7aba6f
16 changed files with 495 additions and 211 deletions

View File

@@ -6,7 +6,8 @@ CREATE TABLE posts (
content TEXT NOT NULL,
cw VARCHAR NOT NULL DEFAULT '',
author_title VARCHAR NOT NULL DEFAULT '',
n_likes INTEGER NOT NULL DEFAULT 0,
is_tmp BOOLEAN NOT NULL DEFAULT FALSE,
n_attentions INTEGER NOT NULL DEFAULT 0,
n_comments INTEGER NOT NULL DEFAULT 0,
create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
last_comment_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,