import request from '@/utils/request'

// 查询预约练车列表
export function listReservationCourse(query) {
  return request({
    url: '/drivingSchool/system/reservationCourse/pclist',
    method: 'get',
    params: query
  })
}

// 查询预约练车详细
export function getReservationCourse(id) {
  return request({
    url: '/drivingSchool/system/reservationCourse/' + id,
    method: 'get'
  })
}

// 新增预约练车
export function addReservationCourse(data) {
  return request({
    url: '/drivingSchool/system/reservationCourse',
    method: 'post',
    data: data
  })
}

// 修改预约练车
export function updateReservationCourse(data) {
  return request({
    url: '/drivingSchool/system/reservationCourse',
    method: 'put',
    data: data
  })
}

// 删除预约练车
export function delReservationCourse(id) {
  return request({
    url: '/drivingSchool/system/reservationCourse/' + id,
    method: 'delete'
  })
}

export function findJlListAll() {
  return request({
    url: '/drivingSchool/system/schoolCoach/list',
    method: 'get'
  })
}

export function updateCourseById(data) {
  return request({
    url: `/drivingSchool/system/reservationCourse/updateCourseById`,
    method: 'post',
    data: data
  })
}
