import api from '../index'

export default {
  page: (data: {
    keyword?: string
    item_type?: string
    status?: string
    owner_type?: string
    owner_id?: number
    page?: number
    size?: number
  }) => api.post('magic-api/biz/allocation/page', data),

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

  assign: (data: any) => api.post('magic-api/biz/allocation/assign', data),

  return: (id: number) => api.post('magic-api/biz/allocation/return', { id }),
}
