/**
 * 轮询告警管理相关类型定义
 */

/**
 * 告警规则
 */
export interface PollingAlertRule {
  id: number
  rule_name: string
  alert_level: string
  metric_type: string
  metric_type_name: string
  task_type: string
  task_type_name: string
  operator: string
  threshold: number
  cooldown_minutes: number
  notify_channels: string
  status: number
  created_at: string
  updated_at: string
}

/**
 * 告警历史
 */
export interface PollingAlertHistory {
  id: number
  rule_id: number
  rule_name: string
  alert_level: string
  metric_type: string
  task_type: string
  threshold: number
  current_value: number
  message: string
  created_at: string
}

/**
 * 创建告警规则请求
 */
export interface CreatePollingAlertRuleRequest {
  rule_name: string
  alert_level: string
  metric_type: string
  task_type: string
  threshold: number
  operator?: string
  cooldown_minutes?: number
  notify_channels?: string
}

/**
 * 更新告警规则请求
 */
export interface UpdatePollingAlertRuleRequest {
  rule_name?: string
  alert_level?: string
  threshold?: number
  cooldown_minutes?: number
  notify_channels?: string
  status?: number
}

/**
 * 告警历史查询参数
 */
export interface PollingAlertHistoryQueryParams {
  rule_id?: number
  page?: number
  page_size?: number
}
