import request from '@/utils/request'

// 查询报警规则列表
export function listAlarmRule(query) {
  return request({
    url: '/business/alarmRule/list',
    method: 'get',
    params: query
  })
}

// 查询报警规则详细
export function getAlarmRule(alarmRuleId) {
  return request({
    url: '/business/alarmRule/' + alarmRuleId,
    method: 'get'
  })
}

// 新增报警规则
export function addAlarmRule(data) {
  return request({
    url: '/business/alarmRule',
    method: 'post',
    data: data
  })
}

// 修改报警规则
export function updateAlarmRule(data) {
  return request({
    url: '/business/alarmRule',
    method: 'put',
    data: data
  })
}

// 删除报警规则
export function delAlarmRule(alarmRuleId) {
  return request({
    url: '/business/alarmRule/' + alarmRuleId,
    method: 'delete'
  })
}
