import request from '@/utils/request'

// 查询cmc聊天附件列表
export function listDocument(query) {
  return request({
    url: '/system/document/list',
    method: 'get',
    params: query
  })
}

// 查询cmc聊天附件详细
export function getDocument(documentId) {
  return request({
    url: '/system/document/' + documentId,
    method: 'get'
  })
}

// 新增cmc聊天附件
export function addDocument(data) {
  return request({
    url: '/system/document',
    method: 'post',
    data: data
  })
}

// 修改cmc聊天附件
export function updateDocument(data) {
  return request({
    url: '/system/document',
    method: 'put',
    data: data
  })
}

// 删除cmc聊天附件
export function delDocument(documentId) {
  return request({
    url: '/system/document/' + documentId,
    method: 'delete'
  })
}
