import request from '@/utils/request'

// 查询安全培训台账列表
export function listLedger(query) {
  return request({
    url: '/safe/train/list',
    method: 'get',
    params: query
  })
}

// 查询安全培训台账详细
export function getLedger(trainId) {
  return request({
    url: '/safe/train/' + trainId,
    method: 'get'
  })
}

// 新增安全培训台账
export function addLedger(data) {
  return request({
    url: '/safe/train',
    method: 'post',
    data: data
  })
}

// 修改安全培训台账
export function updateLedger(data) {
  return request({
    url: '/safe/train',
    method: 'put',
    data: data
  })
}

// 删除安全培训台账
export function delLedger(trainId) {
  return request({
    url: '/safe/train/' + trainId,
    method: 'delete'
  })
}

// 导出安全培训台账
export function exportLedger(query) {
  return request({
    url: '/safe/train/export',
    method: 'get',
    params: query
  })
}
