Restricted notify ability

This commit is contained in:
2024-04-06 16:08:33 +08:00
parent 1b68faf8ba
commit 35b28d1003
6 changed files with 117 additions and 61 deletions

View File

@ -21,13 +21,22 @@ type Channel struct {
RealmID uint `json:"realm_id"`
}
type NotifyLevel = int8
const (
NotifyLevelAll = NotifyLevel(iota)
NotifyLevelMentioned
NotifyLevelNone
)
type ChannelMember struct {
BaseModel
ChannelID uint `json:"channel_id"`
AccountID uint `json:"account_id"`
Channel Channel `json:"channel"`
Account Account `json:"account"`
ChannelID uint `json:"channel_id"`
AccountID uint `json:"account_id"`
Channel Channel `json:"channel"`
Account Account `json:"account"`
Notify NotifyLevel `json:"notify"`
Messages []Message `json:"messages" gorm:"foreignKey:SenderID"`
}