Skip to content

Commit

Permalink
feat: Add trigger fields to NotificationSettingV2 model
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Jul 13, 2024
1 parent 16ac26e commit 54cf19f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/constants/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const (
NotificationTriggerTaskError = "task_error"
NotificationTriggerTaskEmptyResults = "task_empty_results"
NotificationTriggerTaskNever = "task_never"
NotificationTriggerNodeStatusChange = "node_status_change"
NotificationTriggerNodeOnline = "node_online"
NotificationTriggerNodeOffline = "node_offline"
NotificationTriggerNodeNever = "node_never"
)

const (
Expand Down
2 changes: 2 additions & 0 deletions core/models/models/v2/notification_setting_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ type NotificationSettingV2 struct {
TemplateRichText string `json:"template_rich_text,omitempty" bson:"template_rich_text,omitempty"`
TemplateRichTextJson string `json:"template_rich_text_json,omitempty" bson:"template_rich_text_json,omitempty"`
TaskTrigger string `json:"task_trigger" bson:"task_trigger"`
TriggerTarget string `json:"trigger_target" bson:"trigger_target"`
Trigger string `json:"trigger" bson:"trigger"`
Mail NotificationSettingMail `json:"mail,omitempty" bson:"mail,omitempty"`
Mobile NotificationSettingMobile `json:"mobile,omitempty" bson:"mobile,omitempty"`
}
Expand Down

0 comments on commit 54cf19f

Please sign in to comment.