import http from '@/utils/http'

/**
 * 查询场馆
 */
export function find(id) {
  return http.get('/venue/' + id)
}

export function findVenueByType(type) {
  return http.get('/venues/type', { type: type })
}

/**
 * 删除场馆
 */
export function remove(ids) {
  return http.post('/venue/delete', { 'id[]': ids })
}

/**
 * 保存场馆
 */
export function save(params) {
  return http.post('/venue', params)
}

export function updateStatus(id, status) {
  return http.post('/venue/status', { id: id, status: status })
}

export function generate(id) {
  return http.post('/venue/generate', { 'venueId': id })
}

/**
 * 遍历场馆
 */
export function findVenue() {
  return http.get('/venue/venue/venue')
}

export function clear(id) {
  return http.post('/venue/clear', { 'id': id })
}
