community模块
Model 修改
增加 Post:
type Post {
id ID
content String
createTime DateTIme
updateTime DateTime
owner User
}
Redis 存储模式
Reactions given
模式:<reaction_given>:<user_id>[:<resource_id>][:<tag>]
如:
vote:user1000:rc1000[:some_tag] -> -1/1
rating:user1000:rc1000 -> 1-5
save:user1000 -> {rc1000, ...}
like:user1000 -> {rc1000, ...}
Reactions received
模式:<reaction_received>:<resource_id>[:<tag>]
如:
votes:rc1000[:some_tag] -> { pos, neg }
ratings:rc1000 -> { 1..5 count }
saves:rc1000 -> int
likes:rc1000 -> int
comments:rc1000 -> [rc2000, ...]
mentions:rc1000 -> [rc2000, ...]
Listings
list:posts -> [rc1000, ...]
Ranking weights
weight_<type>:rc1000 -> float