import request from '@/utils/request'

// 查询人力资源列表
export function listWorker(query) {
  return request({
    url: '/md/worker/list',
    method: 'get',
    params: query
  })
}

// 查询人力资源详细
export function getWorker(recordId) {
  return request({
    url: '/md/worker/' + recordId,
    method: 'get'
  })
}

// 新增人力资源
export function addWorker(data) {
  return request({
    url: '/md/worker',
    method: 'post',
    data: data
  })
}

// 修改人力资源
export function updateWorker(data) {
  return request({
    url: '/md/worker',
    method: 'put',
    data: data
  })
}

// 删除人力资源
export function delWorker(recordId) {
  return request({
    url: '/md/worker/' + recordId,
    method: 'delete'
  })
}
