import request from "@/util/oaRequest"

// 证书
export function listCertificate(query) {
  return request({
    url: '/hrm/certificate/list',
    method: 'get',
    params: query
  })
}

export function addCertificate(data) {
  return request({
    url: '/hrm/certificate',
    method: 'post',
    data
  })
}

export function updateCertificate(data) {
  return request({
    url: '/hrm/certificate',
    method: 'put',
    data
  })
}

export function delCertificate(certIds) {
  return request({
    url: `/hrm/certificate/${certIds}`,
    method: 'delete'
  })
}

// 合同
export function listContract(query) {
  return request({
    url: '/hrm/contract/list',
    method: 'get',
    params: query
  })
}

export function addContract(data) {
  return request({
    url: '/hrm/contract',
    method: 'post',
    data
  })
}

export function updateContract(data) {
  return request({
    url: '/hrm/contract',
    method: 'put',
    data
  })
}

export function delContract(contractIds) {
  return request({
    url: `/hrm/contract/${contractIds}`,
    method: 'delete'
  })
}

