pushbits/internal/model/notification.go
2021-06-02 17:46:04 +02:00

27 lines
1.3 KiB
Go

package model
import (
"time"
)
// Notification holds information like the message, the title, and the priority of a notification.
type Notification struct {
ID uint `json:"id"`
ApplicationID uint `json:"appid"`
Message string `json:"message" form:"message" query:"message" binding:"required"`
Title string `json:"title" form:"title" query:"title"`
Priority int `json:"priority" form:"priority" query:"priority"`
Extras map[string]interface{} `json:"extras,omitempty" form:"-" query:"-"`
Date time.Time `json:"date"`
}
// DeleteNotification holds information like the message, the reply to message id and the priority of a deletion notification.
type DeleteNotification struct {
ID uint `json:"id"`
DeleteID uint `json:"deleteid"`
ApplicationID uint `json:"appid"`
Message string `json:"message" form:"message" query:"message" binding:"required"`
Priority int `json:"priority" form:"priority" query:"priority"`
Extras map[string]interface{} `json:"extras,omitempty" form:"-" query:"-"`
Date time.Time `json:"date"`
}