import request from '@/utils/request'

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

export function listClassMajor(query) {
  return request({
    url: '/sim/teacher/class-major/list',
    method: 'get',
    params: query
  })
}


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

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

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

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