Auto handle increment of popularity on realm member changes

This commit is contained in:
2025-02-20 21:58:07 +08:00
parent bac655c1cf
commit 2f541f2346
2 changed files with 22 additions and 1 deletions

View File

@ -6,6 +6,12 @@ import (
"gorm.io/datatypes"
)
const (
RealmPopularityMemberFactor = 5
RealmPopularityPostFactor = 10
RealmPopularityChatFactor = 2
)
type Realm struct {
BaseModel