import request from '@/utils/request'

// 查询major列表
export function listMajor(query) {
  return request({
    url: '/system/major/list',
    method: 'get',
    params: query
  })
}

// 查询major列表
export function listMajorAll(query) {
  return request({
    url: '/system/major/listAll',
    method: 'get',
    params: query
  })
}

// 查询major详细
export function getMajor(id) {
  return request({
    url: '/system/major/' + id,
    method: 'get'
  })
}

// 新增major
export function addMajor(data) {
  return request({
    url: '/system/major',
    method: 'post',
    data: data
  })
}

// 修改major
export function updateMajor(data) {
  return request({
    url: '/system/major',
    method: 'put',
    data: data
  })
}

// 删除major
export function delMajor(id) {
  return request({
    url: '/system/major/' + id,
    method: 'delete'
  })
}
