import axios from '@/utils/request'

// 查询预约列表
export function listReservation(query) {
  return axios.get('/reservation/list',{
    params: {
      ...query
    }
  })
}

// 查询全部预约列表
export function listAllReservation(query) {
  return axios.get('/reservation/listAll', {
    params: {
      ...query
    }
  })
}

// 查询预约详细
export function getReservation(id) {
  return axios.get('/reservation/info/' + id)
}

// 新增预约
export function addReservation(data) {
  return axios.post('/reservation/add', {
    ...data
  })
}

// 修改预约
export function updateReservation(data) {
  return axios.put('/reservation', data)
}

// 审核预约
export function auditReservation(data) {
  return axios.put('/reservation/audit', data)
}

// 删除预约
export function delReservation(id) {
  return axios.delete('/reservation/' + id)
}
