import request from '@/utils/request'

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

// 查询教师列表（排除节点）
export function listTeacherExcludeChild(TeacherId) {
  return request({
    url: '/course/teacher/list/exclude/' + TeacherId,
    method: 'get'
  })
}

// 查询教师详细
export function getTeacher(TeacherId) {
  return request({
    url: '/course/teacher/' + TeacherId,
    method: 'get'
  })
}

// 新增教师
export function addTeacher(data) {
  return request({
    url: '/course/teacher',
    method: 'post',
    data: data
  })
}

// 修改教师
export function updateTeacher(data) {
  return request({
    url: '/course/teacher',
    method: 'put',
    data: data
  })
}

// 删除教师
export function delTeacher(TeacherId) {
  return request({
    url: '/course/teacher/' + TeacherId,
    method: 'delete'
  })
}
