/*
 * Author: gn
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/invtory/invgoodstype/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/invtory/invgoodstype',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/invtory/invgoodstype/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/invtory/invgoodstype/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/invtory/invgoodstype',
    method: 'put',
    data: obj
  })
}

export function fetchGoodsTypeTree() {
  return request({
    url: '/invtory/invgoodstype/getAllGoodsType',
    method: 'get'
  })
}
