♻️ Better notification system

This commit is contained in:
2024-06-07 20:05:56 +08:00
parent b925d54000
commit 332557778d
9 changed files with 120 additions and 106 deletions

View File

@ -1,8 +1,6 @@
package models
import (
"time"
"gorm.io/datatypes"
)
@ -14,9 +12,8 @@ type Notification struct {
Content string `json:"content"`
Metadata datatypes.JSONMap `json:"metadata"`
Links datatypes.JSONSlice[NotificationLink] `json:"links"`
IsImportant bool `json:"is_important"`
IsRealtime bool `json:"is_realtime" gorm:"-"`
ReadAt *time.Time `json:"read_at"`
IsForcePush bool `json:"is_force_push" gorm:"-"`
SenderID *uint `json:"sender_id"`
RecipientID uint `json:"recipient_id"`
}