import request from '@/utils/request'

// 查询设备资源列表
export function listMachine(query) {
  return request({
    url: '/md/machine/list',
    method: 'get',
    params: query
  })
}

// 查询设备资源详细
export function getMachine(recordId) {
  return request({
    url: '/md/machine/' + recordId,
    method: 'get'
  })
}

// 新增设备资源
export function addMachine(data) {
  return request({
    url: '/md/machine',
    method: 'post',
    data: data
  })
}

// 修改设备资源
export function updateMachine(data) {
  return request({
    url: '/md/machine',
    method: 'put',
    data: data
  })
}

// 删除设备资源
export function delMachine(recordId) {
  return request({
    url: '/md/machine/' + recordId,
    method: 'delete'
  })
}
