import api from '../index'

export default {
  page: (data: {
    keyword?: string
    category_type?: string
    page?: number
    size?: number
  }) => api.post('magic-api/base/category/page', data),

  list: (data?: { category_type?: string }) => api.get('magic-api/base/category/list', { params: data }),

  detail: (id: number) => api.get('magic-api/base/category/detail', { params: { id } }),

  save: (data: any) => api.post('magic-api/base/category/save', data),

  delete: (id: number) => api.post('magic-api/base/category/delete', { id }),
}
