import { defHttp } from '@/utils/http/axios';
enum Api {
  PageList = '/api/IdleFarming/PageList',
  Detail = '/api/IdleFarming/Detail',
  AddOrEdit = '/api/IdleFarming/AddOrEdit',
  Delete = '/api/IdleFarming/Delete',
}

export function PageList(params: {page, limit, key} ){
  return defHttp.get({ url: Api.PageList, params });
}
export function Detail(params: { id }){
  return defHttp.get({ url: Api.Detail, params });
}
export function AddOrEdit(params){
  return defHttp.post({ 
    url: Api.AddOrEdit, 
    params 
  });
}
export function Delete(params){
  return defHttp.post({ 
    url: Api.Delete, 
    params 
  });
}