import { defHttp } from '@/utils/http/axios'

// 查询求职者信息列表
export function getApplicantPage(params) {
  return defHttp.get({ url: '/recruit/applicant/page', params })
}

// 查询求职者信息详情
export function getApplicant(id: number) {
  return defHttp.get({ url: `/recruit/applicant/get?id=${id}` })
}

// 新增求职者信息
export function createApplicant(data) {
  return defHttp.post({ url: '/recruit/applicant/create', data })
}

// 修改求职者信息
export function updateApplicant(data) {
  return defHttp.put({ url: '/recruit/applicant/update', data })
}

// 删除求职者信息
export function deleteApplicant(id: number) {
  return defHttp.delete({ url: `/recruit/applicant/delete?id=${id}` })
}

// 导出求职者信息 Excel
export function exportApplicant(params) {
  return defHttp.download({ url: '/recruit/applicant/export-excel', params }, '求职者信息.xls')
}
