notification.go 461 B

1234567891011121314151617181920
  1. package models
  2. import "gorm.io/gorm"
  3. type NotificationConfig struct {
  4. gorm.Model
  5. Enabled bool `gorm:"default:true"` // if notifications are enabled at all
  6. Deploy bool `gorm:"default:true"` // for specific events
  7. Success bool `gorm:"default:true"`
  8. Failure bool `gorm:"default:true"`
  9. }
  10. type NotificationConfigExternal struct {
  11. Enabled bool `json:"enabled"`
  12. Deploy bool `json:"deploy"`
  13. Success bool `json:"success"`
  14. Failure bool `json:"failure"`
  15. }