import request from '@/router/axios';

export const getList =
    (current, size, params, companyId) => {
      return request({
        url: '/api/jobslink-api/tenant/talents/manage/list',
        method: 'get',
        params: {...params, current, size, companyId}
      })
    }

export const detail =
    (id) => {
      return request({
        url: '/api/jobslink-api/tenant/talents/detail',
        method: 'get',
        params: {id}
      })
    }

export const save =
    (data) => {
      return request({
        url: '/api/jobslink-api/tenant/talents/manage/save',
        method: 'post',
        data
      })
    }

export const update =
    (data) => {
      return request({
        url: '/api/jobslink-api/tenant/talents/manage/update',
        method: 'post',
        data
      })
    }

export const remove =
    (ids) => {
      return request({
        url: '/api/jobslink-api/tenant/talents/remove',
        method: 'post',
        params: {ids},
      })
    }

export const importTalents = (companyId, isCovered) => {
  return `/api/jobslink-api/tenant/talents/manage/import-talents?companyId=${
      companyId}&isCovered=${isCovered}`
}
