import { request } from '@/utils'

export default {
  create: data => request.post('/category', data),
  read: (params = {}) => request.get('/category/page', { params }),
  update: data => request.patch(`/category/${data.id}`, data),
  delete: id => request.delete(`/category/${id}`),
  getAll: data => request.get('/category/tree?enable=1', data),

}
