import request from '@/utils/request'

export function listAchievement(query) {
  return request({
    url: '/achievement/list',
    method: 'get',
    params: query
  })
}

export function getAchievement(id) {
  return request({
    url: '/achievement/' + id,
    method: 'get'
  })
}

export function addAchievement(data) {
  return request({
    url: '/achievement',
    method: 'post',
    data: data
  })
}

export function updateAchievement(data) {
  return request({
    url: '/achievement',
    method: 'put',
    data: data
  })
}

export function delAchievement(id) {
  return request({
    url: '/achievement/' + id,
    method: 'delete'
  })
}

export function getAchievementOverview(id) {
  return request({
    url: '/achievement/overview/' + id,
    method: 'get'
  })
}

export function updateAchievementOverview(data) {
  return request({
    url: '/achievement/overview',
    method: 'put',
    data: data
  })
}
