Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:02:57 +08:00
commit daf63b8e96
9 changed files with 1543 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
Table follows {
following_user_id integer
followed_user_id integer
created_at timestamp
}
Table users {
id integer [primary key]
username varchar
role varchar
created_at timestamp
}
Table posts {
id integer [primary key]
title varchar
body text [note: 'Content of the post']
user_id integer [not null]
status varchar
created_at timestamp
}
Ref user_posts: posts.user_id > users.id // many-to-one
Ref: users.id < follows.following_user_id
Ref: users.id < follows.followed_user_id