feat: implement V2 alert center and scoped alert governance

This commit is contained in:
Yvan
2026-11-05 20:08:29 +08:00
parent f8e26c5baf
commit 999c9a6315
57 changed files with 2711 additions and 216 deletions
+16 -11
View File
@@ -3,6 +3,8 @@ package dto
import "encoding/json"
type AlertRecordQuery struct {
AlertContent string `form:"alertContent"`
Lost *bool `form:"lost"`
Page int `form:"pageNum"`
PageSize int `form:"pageSize"`
PlatformCodes string `form:"platformCodes"`
@@ -29,18 +31,21 @@ type AlertNoteRequest struct {
}
type AlertRecordResponse struct {
ID uint64 `json:"id,string"`
PlatformCode string `json:"platformCode"`
PlatformName string `json:"platformName"`
RuleID uint64 `json:"ruleId,string"`
RuleName string `json:"ruleName"`
RuleType string `json:"ruleType"`
RuleTypeLabel string `json:"ruleTypeLabel"`
MonitorMetric *int `json:"monitorMetric"`
MonitorMetricLabel string `json:"monitorMetricLabel"`
// 旧视图声明了颜色,但记录没有对应快照字段,保留空值。
TotalPlayers *int64 `json:"totalPlayers"`
TotalPay *string `json:"totalPay"`
Lost *bool `json:"lost"`
ID uint64 `json:"id,string"`
PlatformCode string `json:"platformCode"`
PlatformName string `json:"platformName"`
RuleID uint64 `json:"ruleId,string"`
RuleName string `json:"ruleName"`
RuleType string `json:"ruleType"`
RuleTypeLabel string `json:"ruleTypeLabel"`
MonitorMetric *int `json:"monitorMetric"`
MonitorMetricLabel string `json:"monitorMetricLabel"`
// 历史记录无快照时返回 null,不回填当前数值。
WarningColor *string `json:"warningColor"`
TargetPromoteID uint64 `json:"targetPromoteId"`
TargetPromoteID uint64 `json:"targetPromoteId,string"`
TargetPromoteName string `json:"targetPromoteName"`
BusinessID uint `json:"businessId"`
BusinessName string `json:"businessName"`