import api from '../index'

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

  list: () => api.get('magic-api/sys/dept/list'),

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

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

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