mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
为新增字段提供默认值
This commit is contained in:
parent
0aaf642f69
commit
13abf2af13
@ -28,10 +28,10 @@ type AlertRule struct {
|
||||
Name string
|
||||
RulesRaw string
|
||||
Enable *bool
|
||||
TriggerMode int `gorm:"default:0"` // 触发模式: 0-始终触发(默认) 1-单次触发
|
||||
NotificationTag string // 该报警规则所在的通知组
|
||||
FailTriggerTasksRaw string
|
||||
RecoverTriggerTasksRaw string
|
||||
TriggerMode int `gorm:"default:0"` // 触发模式: 0-始终触发(默认) 1-单次触发
|
||||
NotificationTag string // 该报警规则所在的通知组
|
||||
FailTriggerTasksRaw string `gorm:"default:'[]'"`
|
||||
RecoverTriggerTasksRaw string `gorm:"default:'[]'"`
|
||||
Rules []Rule `gorm:"-" json:"-"`
|
||||
FailTriggerTasks []uint64 `gorm:"-" json:"-"` // 失败时执行的触发任务id
|
||||
RecoverTriggerTasks []uint64 `gorm:"-" json:"-"` // 恢复时执行的触发任务id
|
||||
|
Loading…
Reference in New Issue
Block a user