import request from '@/utils/request'

// 查询考试记录列表
export function listExam(query) {
  return request({
    url: '/exam/user/exam/list',
    method: 'get',
    params: query
  })
}

// 查询考试记录列表
export function myListExam(query) {
  return request({
    url: '/exam/user/exam/list/my',
    method: 'get',
    params: query
  })
}

// 查询考试记录详细
export function getExam(id) {
  return request({
    url: '/exam/user/exam/' + id,
    method: 'get'
  })
}

// 新增考试记录
export function addExam(data) {
  return request({
    url: '/exam/user/exam',
    method: 'post',
    data: data
  })
}

// 修改考试记录
export function updateExam(data) {
  return request({
    url: '/exam/user/exam',
    method: 'put',
    data: data
  })
}

// 删除考试记录
export function delExam(id) {
  return request({
    url: '/exam/user/exam/' + id,
    method: 'delete'
  })
}
