import request from '@/utils/request'

// 查询设备事件列表
export function listMqttEvent(query) {
  return request({
    url: '/worn/mqttEvent/list',
    method: 'get',
    params: query
  })
}

// 查询设备事件详细
export function getMqttEvent(id) {
  return request({
    url: '/worn/mqttEvent/' + id,
    method: 'get'
  })
}

// 新增设备事件
export function addMqttEvent(data) {
  return request({
    url: '/worn/mqttEvent',
    method: 'post',
    data: data
  })
}

// 修改设备事件
export function updateMqttEvent(data) {
  return request({
    url: '/worn/mqttEvent',
    method: 'put',
    data: data
  })
}

// 删除设备事件
export function delMqttEvent(id) {
  return request({
    url: '/worn/mqttEvent/' + id,
    method: 'delete'
  })
}
