import request from '@/utils/request'
// const baseURL = process.env.VUE_APP_BASE_API
const baseURL = ''

// 获取所有设备类型
export function getAllDeviceModel(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/all`,
    method: 'post',
    data
  })
}

// 获取设备类型列表-分页
export function getDeviceInstance(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/list`,
    method: 'post',
    data
  })
}

// 新建设备实例
export function addDeviceInstance(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/add`,
    method: 'post',
    data
  })
}

// 编辑设备实例
export function updateDeviceInstance(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/edit`,
    method: 'post',
    data
  })
}

// 编辑设备实例
export function deleteDeviceInstance(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/delete`,
    method: 'post',
    data
  })
}
