Files
kra-new/internal/service/dto/alert_rule.go
T

48 lines
1.9 KiB
Go

package dto
import "encoding/json"
type AlertRuleQuery struct {
Page int `form:"pageNum"`
PageSize int `form:"pageSize"`
RuleName string `form:"ruleName"`
RuleType string `form:"ruleType"`
MonitorMetric string `form:"monitorMetric"`
}
type AlertRuleRequest struct {
ID uint64 `json:"id"`
RuleName string `json:"ruleName"`
RuleType string `json:"ruleType"`
MonitorMetric int `json:"monitorMetric"`
StatPeriodDays *int `json:"statPeriodDays"`
MomDirection *int `json:"momDirection"`
MomThreshold *json.Number `json:"momThreshold"`
UnloginDays *int `json:"unloginDays"`
WarningColor string `json:"warningColor"`
}
type AlertRuleResponse struct {
ID uint64 `json:"id"`
RuleName string `json:"ruleName"`
RuleType string `json:"ruleType"`
RuleTypeLabel string `json:"ruleTypeLabel"`
MonitorMetric int `json:"monitorMetric"`
MonitorMetricLabel string `json:"monitorMetricLabel"`
StatPeriodDays *int `json:"statPeriodDays"`
MomDirection *int `json:"momDirection"`
MomDirectionLabel string `json:"momDirectionLabel"`
MomThreshold *json.Number `json:"momThreshold"`
UnloginDays *int `json:"unloginDays"`
MonitorScope int `json:"monitorScope"`
WarningColor string `json:"warningColor"`
CreatorID uint `json:"creatorId"`
CreatorName string `json:"creatorName"`
Enabled int `json:"enabled"`
CreatedAt *string `json:"createdAt"`
UpdatedAt *string `json:"updatedAt"`
RuleDescription string `json:"ruleDescription"`
}
type AlertRulePage struct {
Rows []*AlertRuleResponse `json:"rows"`
Total int64 `json:"total"`
}