import request from '../index'
const prefix = 'resource/staff'

export function getTrainList(data: any) {
  return request({
    url: `${prefix}/train/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function getTrainStaffList(data: any) {
  return request({
    url: `${prefix}/train/staff/listPage?limit=${data.limit}&offset=${data.offset}`,
    method: 'post',
    data,
  })
}

export function addTrainInfo(data: object) {
  return request({
    url: `${prefix}/train/add`,
    method: 'post',
    data,
  })
}

export function updateTrainInfo(data: object) {
  return request({
    url: `${prefix}/train/update`,
    method: 'post',
    data,
  })
}

export function deleteTrainInfo(data: Object) {
  return request({
    url: `${prefix}/train/delete`,
    method: 'post',
    data,
  })
}
