import request from '@/utils/request'

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

// 查询老师详细
export function getTeacher(teacherId) {
  return request({
    url: '/dz/teacher/' + teacherId,
    method: 'get'
  })
}

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

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

// 删除老师
export function delTeacher(teacherId) {
  return request({
    url: '/dz/teacher/' + teacherId,
    method: 'delete'
  })
}
