import request from '@/utils/request'

// 查询设备主题列表
export function listTopic(query) {
  return request({
    url: '/device/topic/list',
    method: 'get',
    params: query
  })
}

// 查询设备主题详细
export function getTopic(id) {
  return request({
    url: '/device/topic/' + id,
    method: 'get'
  })
}

// 新增设备主题
export function addTopic(data) {
  return request({
    url: '/device/topic',
    method: 'post',
    data: data
  })
}

// 修改设备主题
export function updateTopic(data) {
  return request({
    url: '/device/topic',
    method: 'put',
    data: data
  })
}

// 删除设备主题
export function delTopic(id) {
  return request({
    url: '/device/topic/' + id,
    method: 'delete'
  })
}
