import request from '@/utils/request'

// 创建档案借阅申请
export function createBorrowApply(data) {
  return request({
    url: '/archives/borrow-apply/create',
    method: 'post',
    data: data
  })
}

// 更新档案借阅申请
export function updateBorrowApply(data) {
  return request({
    url: '/archives/borrow-apply/update',
    method: 'put',
    data: data
  })
}

// 删除档案借阅申请
export function deleteBorrowApply(id) {
  return request({
    url: '/archives/borrow-apply/delete?id=' + id,
    method: 'delete'
  })
}

// 获得档案借阅申请
export function getBorrowApply(id) {
  return request({
    url: '/archives/borrow-apply/get?id=' + id,
    method: 'get'
  })
}

// 获得档案借阅申请分页
export function getBorrowApplyPage(query) {
  return request({
    url: '/archives/borrow-apply/page',
    method: 'get',
    params: query
  })
}

// 导出档案借阅申请 Excel
export function exportBorrowApplyExcel(query) {
  return request({
    url: '/archives/borrow-apply/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
