notification.go 382 B

123456789101112131415161718
  1. package model
  2. type NotificationType int
  3. const (
  4. NotificationError NotificationType = iota
  5. NotificationWarning
  6. NotificationInfo
  7. NotificationSuccess
  8. )
  9. type Notification struct {
  10. Model
  11. Type NotificationType `json:"type"`
  12. Title string `json:"title"`
  13. Content string `json:"content"`
  14. Details any `json:"details" gorm:"serializer:json"`
  15. }