import request from '@/utils/request'

// 查询时间段
export const slotPageService = (data) => request.post('/slot/page', data)

// 查询时间段下的可用场地信息
export const venuesQuery = (id) => request.get('/slot/venue?id=' + id)

// 添加禁用时间段
export const slotAdd = (data) => request.post('/slot/add', data)

// 向禁用时间段下添加场地信息
export const slotSet = (formData) => request.post('/slot/set', formData)

// 查询某禁用时间段下的已添加场地信息
export const venuesInquire = (id) => request.get('/slot/inquire?slotId=' + id)

// 移除场地数据
export const slotDel = (formData) => request.post('/slot/del', formData)

// 查询时间段下，可添加的场地信息
export const venueGetService = (id) => request.get('/time/get?id=' + id)

// 移除当前时间段下的场地
export const venueDeleteService = (fromData) =>
  request.post('/time/delete', fromData)

// 向当前时间段添加场地
export const venueAddService = (fromData) => request.post('/time/add', fromData)

// 添加时间段
export const timeAddService = (fromData) =>
  request.post('/time/create', fromData)

// 移除时间段
export const timeRemoveService = (id) =>
  request.get('/time/remove?timeId=' + id)
