From 5b67717ebe51f18785697f4e4d307b447537ce6c Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Tue, 30 Jul 2024 15:46:02 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(models):=20add=20HasMetricTarg?= =?UTF-8?q?et=20and=20LastingSeconds=20fields=20to=20NotificationAlertV2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/models/models/v2/notification_alert_v2.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/models/models/v2/notification_alert_v2.go b/core/models/models/v2/notification_alert_v2.go index ad35841b..bd947b5f 100644 --- a/core/models/models/v2/notification_alert_v2.go +++ b/core/models/models/v2/notification_alert_v2.go @@ -8,9 +8,11 @@ type NotificationAlertV2 struct { Name string `json:"name" bson:"name"` Description string `json:"description" bson:"description"` Enabled bool `json:"enabled" bson:"enabled"` + HasMetricTarget bool `json:"has_metric_target" bson:"has_metric_target"` MetricTargetId primitive.ObjectID `json:"metric_target_id,omitempty" bson:"metric_target_id,omitempty"` MetricName string `json:"metric_name" bson:"metric_name"` Operator string `json:"operator" bson:"operator"` + LastingSeconds int `json:"lasting_seconds" bson:"lasting_seconds"` TargetValue float32 `json:"target_value" bson:"target_value"` Level string `json:"level" bson:"level"` }