feat(models): add HasMetricTarget and LastingSeconds fields to NotificationAlertV2

This commit is contained in:
Marvin Zhang
2024-07-30 15:46:02 +08:00
parent 779d831a6d
commit 5b67717ebe

View File

@@ -8,9 +8,11 @@ type NotificationAlertV2 struct {
Name string `json:"name" bson:"name"` Name string `json:"name" bson:"name"`
Description string `json:"description" bson:"description"` Description string `json:"description" bson:"description"`
Enabled bool `json:"enabled" bson:"enabled"` 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"` MetricTargetId primitive.ObjectID `json:"metric_target_id,omitempty" bson:"metric_target_id,omitempty"`
MetricName string `json:"metric_name" bson:"metric_name"` MetricName string `json:"metric_name" bson:"metric_name"`
Operator string `json:"operator" bson:"operator"` Operator string `json:"operator" bson:"operator"`
LastingSeconds int `json:"lasting_seconds" bson:"lasting_seconds"`
TargetValue float32 `json:"target_value" bson:"target_value"` TargetValue float32 `json:"target_value" bson:"target_value"`
Level string `json:"level" bson:"level"` Level string `json:"level" bson:"level"`
} }