a mini social media app for small communities
1module entity
2
3// stores like information for posts
4pub struct Like {
5pub mut:
6 id int @[primary; sql: serial]
7 user_id int
8 post_id int
9 is_like bool
10}
11
12// Stores total likes per post
13pub struct LikeCache {
14pub mut:
15 id int @[primary; sql: serial]
16 post_id int
17 likes int
18}