import request from '@/utils/request'




export function getContentList(query) {
  return request({
    url: '/ability/content/',
    method: 'get',
    params: query
  })
}

export function getContent(id) {
  return request({
    url: `/ability/content/${id}/`,
    method: 'get'
  })
}

export function createContent(data) {
  return request({
    url: '/ability/content/',
    method: 'post',
    data
  })
}

export function updateContent(id, data) {
  return request({
    url: `/ability/content/${id}/`,
    method: 'put',
    data
  })
}

export function deleteContent(id, data) {
  return request({
    url: `/ability/content/${id}/`,
    method: 'delete',
    data
  })
}


export function getRecordList(query) {
  return request({
    url: '/ability/record/',
    method: 'get',
    params: query
  })
}


export function getRecord(id) {
  return request({
    url: `/ability/record/${id}/`,
    method: 'get'
  })
}

export function confirmRecord(id, data) {
  return request({
    url: `/ability/record/${id}/confirm/`,
    method: 'put',
    data
  })
}

export function updateRecord(id, data) {
  return request({
    url: `/ability/record/${id}/`,
    method: 'put',
    data
  })
}
export function updateRecords(data) {
  return request({
    url: '/ability/record/updates/',
    method: 'put',
    data
  })
}


export function upRecord(id, data) {
  return request({
    url: `/ability/record/${id}/up/`,
    method: 'put',
    data
  })
}

export function rejectRecord(id, data) {
  return request({
    url: `/ability/record/${id}/reject/`,
    method: 'put',
    data
  })
}
export function deleteRecord(id) {
  return request({
    url: `/ability/record/${id}/`,
    method: 'delete',
  })
}
export function createRecord(data) {
  return request({
    url: `/ability/record/`,
    method: 'post',
    data
  })
}