import request from '@/utils/request'

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

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

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

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

// 删除培训记录
export function delTrain(trainId) {
  return request({
    url: '/oa/train/' + trainId,
    method: 'delete'
  })
}
