export type AlarmType = '1' | '2' | '3' | '4' | '5';

export interface AlarmRuleVO {
  id: string | number;
  ruleName?: string;
  version?: string;
  enabled?: string;
  effectiveStart?: string;
  effectiveEnd?: string;
  alarmType?: AlarmType | string;
  alarmRule?: Record<string, any>;
  alarmLevel?: string;
  bindDeviceIds?: string[];
  createTime?: string;
  updateTime?: string;
}

export interface AlarmRuleQuery extends PageQuery {
  ruleName?: string;
  alarmType?: string;
  enabled?: string;
}

export type AlarmRuleForm = Partial<AlarmRuleVO>;

export interface BindAlarmRuleDevicesForm {
  id: string | number;
  deviceIds: string[];
}

export interface AlarmDetailVO {
  id: string | number;
  alarmDeviceId?: string;
  alarmDeviceName?: string;
  alarmPosition?: string;
  alarmTime?: string;
  handleTime?: string;
  handler?: string;
  handleInfo?: string;
  alarmLevel?: string;
  alarmType?: string;
  alarmDetail?: string;
  createTime?: string;
  updateTime?: string;
}

export interface AlarmDetailQuery extends PageQuery {
  alarmDeviceName?: string;
  alarmType?: string;
  alarmLevel?: string;
  deviceType?: string | number;
  unhandled?: string;
  today?: string;
}
