import request from '/@/utils/request'

export function fetchList(query?: Object) {
  return request({
    url: '/hr/personLeaveApplication/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj?: Object) {
  return request({
    url: '/hr/personLeaveApplication',
    method: 'post',
    data: obj
  })
}

export function getObj(id?: string) {
  return request({
    url: '/hr/personLeaveApplication/' + id,
    method: 'get'
  })
}

export function delObjs(ids?: Object) {
  return request({
    url: '/hr/personLeaveApplication/removeByIds',
    method: 'post',
    data: ids
  })
}

export function putObj(obj?: Object) {
  return request({
    url: '/hr/personLeaveApplication/updateById',
    method: 'post',
    data: obj
  })
}
