import request from '@/utils/request'

// 查询培训列表
export function listTrain(query) {
  return request({
    url: '/mudu/train/list',
    method: 'get',
    params: query
  })
}

// 查询培训详细
export function getTrain(id) {
  return request({
    url: '/mudu/train/' + id,
    method: 'get'
  })
}

// 新增培训
export function addTrain(data) {
  return request({
    url: '/mudu/train',
    method: 'post',
    data: data
  })
}

// 修改培训
export function updateTrain(data) {
  return request({
    url: '/mudu/train',
    method: 'put',
    data: data
  })
}

// 删除培训
export function delTrain(id) {
  return request({
    url: '/mudu/train/' + id,
    method: 'delete'
  })
}
