import request from "@/utils/request"

// 投递简历分页
export const getPersonCvPage = async (params) => {
  return request({
    url: '/app-api/menduner/system/recruit/person-cv/page',
    params,
    method: 'GET',
    custom: {
      showLoading: false,
      auth: true
    }
  })
}

// 不合适简历分页
export const personCvUnfitPage = async (params) => {
  return request({
    url: '/app-api/menduner/system/recruit/person-cv/unfitPage',
    params,
    method: 'GET',
    custom: {
      showLoading: false,
      auth: true
    }
  })
}

// 不合适
export const joinEliminate = async (data) => {
  return request({
    url: '/app-api/menduner/system/recruit/person-cv/unfit/eliminate',
    method: 'POST',
    data,
    custom: {
      showLoading: false,
      auth: true
    }
  })
}

// 取消不合适
export const personCvUnfitCancel = async (id) => {
  return request({
    url: '/app-api/menduner/system/recruit/person-cv/unfit/cancellation?id=' + id,
    method: 'POST',
    custom: {
      showLoading: false,
      auth: true
    }
  })
}

// 加入储备
export const joinToTalentPool = async (id) => {
  return request({
    url: `/app-api/menduner/system/enterprise-talent-pool/add?userId=${id}`,
    method: 'POST',
    custom: {
      openEncryption: true,
      showLoading: false,
      auth: true
    }
  })
}

// 入职
export const personEntryByEnterprise = async (id) => {
  return request({
    url: `/app-api/menduner/system/recruit/person-cv/entry?id=${id}`,
    method: 'POST',
    custom: {
      showLoading: false,
      auth: true
    }
  })
}

// 结算
export const hireJobCvRelSettlement = async (id) => {
  return request({
    url: `/app-api/menduner/system/recruit/person-cv/settlement?id=${id}`,
    method: 'POST',
    custom: {
      showLoading: false,
      auth: true
    }
  })
}

// 记录查看简历
export const personJobCvLook = async (id) => {
  return request({
    url: `/app-api/menduner/system/recruit/person-cv/look?id=${id}`,
    method: 'POST',
    custom: {
      showLoading: false,
      auth: true,
      openEncryption: true
    }
  })
}

// 根据专业名称模糊搜索
export const schoolMajorByName = async (params) => {
  return request({
    url: '/app-api/menduner/system/major/search/by/name',
    params,
    method: 'GET',
    custom: {
     showLoading: false,
     auth: true
    }
  })
}
  
// 根据专业id搜索
export const schoolMajorById = async (params) => {
  return request({
    url: '/app-api/menduner/system/major/get',
    params,
    method: 'GET',
    custom: {
     showLoading: false,
     auth: true
    }
  })
}