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