import request from '@/utils/request'

// 查询企业通话列表
export function listCompanyVoice(query) {
  return request({
    url: '/company/companyVoice/list',
    method: 'get',
    params: query
  })
}

// 查询企业通话详细
export function getCompanyVoice(voiceId) {
  return request({
    url: '/company/companyVoice/' + voiceId,
    method: 'get'
  })
}
// 购买通话
export function companyBuyVoice(param) {
  return request({
    url: '/company/companyVoice/buy',
    data: param,
    method: 'post'
  })
}
// 新增企业通话
export function addCompanyVoice(data) {
  return request({
    url: '/company/companyVoice',
    method: 'post',
    data: data
  })
}

// 修改企业通话
export function updateCompanyVoice(data) {
  return request({
    url: '/company/companyVoice',
    method: 'put',
    data: data
  })
}

// 删除企业通话
export function delCompanyVoice(voiceId) {
  return request({
    url: '/company/companyVoice/' + voiceId,
    method: 'delete'
  })
}

// 导出企业通话
export function exportCompanyVoice(query) {
  return request({
    url: '/company/companyVoice/export',
    method: 'get',
    params: query
  })
}
