import {
  get,
  post
} from '@/common/utils/http-util.ts'

export default {
  paging(data: WarehouseTypes.SearchWarehouseParam) {
    return get<G.PageResult<WarehouseTypes.SearchWarehouseResult>>('/warehouse/paging', data)
  },
  detail(id: string) {
    return get<WarehouseTypes.SearchWarehouseResult>('/warehouse/detail', {id})
  },
  add(data: WarehouseTypes.AddWarehouseParam) {
    return post('/warehouse/add', data)
  },
  modify(data: WarehouseTypes.ModifyWarehouseParam) {
    return post('/warehouse/modify', data)
  },
  del(ids: string[]) {
    return post('/warehouse/del', ids)
  },
}
