From 13abf2af1386c4810b7feb919bb32084149c76bb Mon Sep 17 00:00:00 2001 From: Akkia Date: Wed, 14 Sep 2022 12:16:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=8F=90=E4=BE=9B=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/alertrule.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/model/alertrule.go b/model/alertrule.go index 37c7b77..ca3710b 100644 --- a/model/alertrule.go +++ b/model/alertrule.go @@ -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