import request from '@/config/axios'

// 实时报警记录 VO
export interface DeviceWarningRecordVO {
  createTime: string
  updateTime: string
  creator: string
  updater: string
  deleted: boolean
  id: number
  deviceId: number
  modelId: number
  rule: string
  alarmLevel: string
  addressValue: string
  ruleId: number
  deviceName: string
  modelName: string
  ruleName: string
}

// 实时报警记录 API
export const DeviceWarningRecordApi = {
  // 获得实时报警记录列表
  getList: async (params?: any) => {
    return await request.get({ url: `/iot/device-warinning-record/getList`, params })
  },
  // 获得最近7小时产量
  getLastSevenHoursCount: async (params?: any) => {
    return await request.get({ url: `/iot/device-warinning-record/getLastSevenHoursCount`, params })
  }
}
