import request from '@/utils/request'

// 查询仓库列表
export function listStorage(query) {
  return request({
    url: '/app/storage/list',
    method: 'get',
    params: query
  })
}

// 查询仓库详细
export function getStorage(id) {
  return request({
    url: '/app/storage/' + id,
    method: 'get'
  })
}

// 新增仓库
export function addStorage(data) {
  return request({
    url: '/app/storage',
    method: 'post',
    data: data
  })
}

// 修改仓库
export function updateStorage(data) {
  return request({
    url: '/app/storage',
    method: 'put',
    data: data
  })
}

// 删除仓库
export function delStorage(id) {
  return request({
    url: '/app/storage/' + id,
    method: 'delete'
  })
}
