import api from '../index'

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

  list: (data?: { manufacturer_id?: number }) => api.get('magic-api/base/model/list', { params: data }),

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

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

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