import request from '@/utils/request'

export function getTrainList(query) {
  return request({
    url: '/employee/train/',
    method: 'get',
    params: query
  })
}
export function getTrain(id) {
  return request({
    url: `/employee/train/${id}/`,
    method: 'get'
  })
}
export function createTrain(data) {
  return request({
    url: '/employee/train/',
    method: 'post',
    data
  })
}

export function updateTrain(id, data) {
  return request({
    url: `/employee/train/${id}/`,
    method: 'put',
    data
  })
}

export function deleteTrain(id) {
  return request({
    url: `/employee/train/${id}/`,
    method: 'delete'
  })
}
