import request from '@/utils/request'

export function getpEquipmentList(query) {
  return request({
    url: '/em/equipment/',
    method: 'get',
    params: query
  })
}
export function getEquipmentAll() {
  return request({
    url: '/em/equipment/',
    method: 'get'
  })
}
export function createEquipment(data) {
  return request({
    url: '/em/equipment/',
    method: 'post',
    data
  })
}
export function updateEquipment(id, data) {
  return request({
    url: `/em/equipment/${id}/`,
    method: 'put',
    data
  })
}
export function deleteEquipment(id, data) {
  return request({
    url: `/em/equipment/${id}/`,
    method: 'delete',
    data
  })
}
export function getEquipmentrecordList(query) {
  return request({
    url: '/em/equipmentrecord/',
    method: 'get',
    params: query
  })
}
export function getEquipmentrecordAll() {
  return request({
    url: '/em/equipmentrecord/',
    method: 'get'
  })
}
export function createEquipmentrecord(data) {
  return request({
    url: '/em/equipmentrecord/',
    method: 'post',
    data
  })
}
export function updateEquipmentrecord(id, data) {
  return request({
    url: `/em/equipmentrecord/${id}/`,
    method: 'put',
    data
  })
}
export function deleteEquipmentrecord(id, data) {
  return request({
    url: `/em/equipmentrecord/${id}/`,
    method: 'delete',
    data
  })
}