import request from '@/utils/request'

// 查询设备绑定1列表
export function listRelation(query) {
  return request({
    url: '/deviceRelation/relation/list',
    method: 'get',
    params: query
  })
}

// 查询设备绑定1详细
export function getRelation(relationId) {
  return request({
    url: '/deviceRelation/relation/' + relationId,
    method: 'get'
  })
}

// 新增设备绑定1
export function addRelation(data) {
  return request({
    url: '/deviceRelation/relation',
    method: 'post',
    data: data
  })
}

// 修改设备绑定1
export function updateRelation(data) {
  return request({
    url: '/deviceRelation/relation',
    method: 'put',
    data: data
  })
}

// 删除设备绑定1
export function delRelation(relationId) {
  return request({
    url: '/deviceRelation/relation/' + relationId,
    method: 'delete'
  })
}

// 导出设备绑定1
export function exportRelation(query) {
  return request({
    url: '/deviceRelation/relation/export',
    method: 'get',
    params: query
  })
}