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

export default {
  paging(data: GoodsCategoryTypes.SearchGoodsCategoryParam) {
    return get<G.PageResult<GoodsCategoryTypes.SearchGoodsCategoryResult>>('/goods_category/paging', data)
  },
  detail(id: string) {
    return get<GoodsCategoryTypes.SearchGoodsCategoryResult>('/goods_category/detail', {id})
  },
  add(data: GoodsCategoryTypes.AddGoodsCategoryParam) {
    return post('/goods_category/add', data)
  },
  modify(data: GoodsCategoryTypes.ModifyGoodsCategoryParam) {
    return post('/goods_category/modify', data)
  },
  del(ids: string[]) {
    return post('/goods_category/del', ids)
  },
}
