import request from '@/utils/request'

// 查询教室列表
export function listClassroom(query) {
  return request({
    url: '/course/classroom/list',
    method: 'get',
    params: query
  })
}

// 查询教室分页列表
export function pageClassroom(query) {
  return request({
    url: '/course/classroom/page',
    method: 'get',
    params: query
  })
}

// 查询教室详细
export function getClassroom(id) {
  return request({
    url: '/course/classroom/' + id,
    method: 'get'
  })
}

// 新增教室
export function addClassroom(data) {
  return request({
    url: '/course/classroom',
    method: 'post',
    data: data
  })
}

// 修改教室
export function updateClassroom(data) {
  return request({
    url: '/course/classroom',
    method: 'put',
    data: data
  })
}

// 删除教室
export function delClassroom(id) {
  return request({
    url: '/course/classroom/' + id,
    method: 'delete'
  })
}

// 批量删除教室
export function batchDeleteClassroom(ids) {
  return request({
    url: '/course/classroom/batch',
    method: 'delete',
    data: ids
  })
}

// 导出教室
export function exportClassroom(query) {
  return request({
    url: '/course/classroom/export',
    method: 'get',
    params: query
  })
}
