package dto // 通知与告警域 type NotifyConfigRequest struct { Enabled bool `json:"enabled"` Webhook string `json:"webhook" binding:"omitempty,url"` SigningSecret string `json:"signingSecret"` } type AlertRuleRequest struct { Name string `json:"name" binding:"required"` SourceID uint `json:"sourceId" binding:"required"` ChannelIDs []uint `json:"channelIds"` Query string `json:"query" binding:"required"` WindowMin int `json:"windowMin"` Threshold int `json:"threshold"` Enabled bool `json:"enabled"` CooldownMin int `json:"cooldownMin"` } type NotifyChannelRequest struct { ID uint `json:"id"` Name string `json:"name"` Webhook string `json:"webhook" binding:"omitempty,url"` SigningSecret string `json:"signingSecret"` Enabled bool `json:"enabled"` }