2024-02-01 07:08:40 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type Notification struct {
|
|
|
|
BaseModel
|
|
|
|
|
|
|
|
Subject string `json:"subject"`
|
|
|
|
Content string `json:"content"`
|
|
|
|
IsImportant bool `json:"is_important"`
|
|
|
|
ReadAt *time.Time `json:"read_at"`
|
2024-02-01 07:58:28 +00:00
|
|
|
SenderID *uint `json:"sender_id"`
|
2024-02-01 07:08:40 +00:00
|
|
|
RecipientID uint `json:"recipient_id"`
|
|
|
|
}
|
2024-02-07 15:15:16 +00:00
|
|
|
|
|
|
|
const (
|
|
|
|
NotifySubscriberFirebase = "firebase"
|
|
|
|
)
|
|
|
|
|
|
|
|
type NotificationSubscriber struct {
|
|
|
|
BaseModel
|
|
|
|
|
|
|
|
UserAgent string `json:"user_agent"`
|
|
|
|
Provider string `json:"provider"`
|
|
|
|
DeviceID string `json:"device_id"`
|
|
|
|
AccountID uint `json:"account_id"`
|
|
|
|
}
|