import axios from '@/utils/request'

// 查询预约时段列表
export function listReservationTimeSlot(query) {
  return axios.get('/reservationTimeSlot/list',{
    params: {
      ...query
    }
  })
}

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

// 查询当天及往后7天的预约时段信息
export function listNext7Days() {
  return axios.get('/reservationTimeSlot/listNext7Days')
}

// 查询预约时段详细
export function getReservationTimeSlot(id) {
  return axios.get('/reservationTimeSlot/info/' + id)
}

// 新增预约时段
export function addReservationTimeSlot(data) {
  return axios.post('/reservationTimeSlot/add', {
    ...data
  })
}

// 批量新增预约时段（根据日期范围）
export function batchAddReservationTimeSlot(data) {
  return axios.post('/reservationTimeSlot/batchAdd', {
    ...data
  })
}

// 修改预约时段
export function updateReservationTimeSlot(data) {
  return axios.put('/reservationTimeSlot', data)
}

// 删除预约时段
export function delReservationTimeSlot(id) {
  return axios.delete('/reservationTimeSlot/' + id)
}
