import request from '@/utils/request'

// 查询会员套餐列表
export function listUserVipPackage(query) {
  return request({
    url: '/course/userVipPackage/list',
    method: 'get',
    params: query
  })
}

// 查询会员套餐详细
export function getUserVipPackage(packageId) {
  return request({
    url: '/course/userVipPackage/' + packageId,
    method: 'get'
  })
}

// 新增会员套餐
export function addUserVipPackage(data) {
  return request({
    url: '/course/userVipPackage',
    method: 'post',
    data: data
  })
}

// 修改会员套餐
export function updateUserVipPackage(data) {
  return request({
    url: '/course/userVipPackage',
    method: 'put',
    data: data
  })
}

// 删除会员套餐
export function delUserVipPackage(packageId) {
  return request({
    url: '/course/userVipPackage/' + packageId,
    method: 'delete'
  })
}

// 导出会员套餐
export function exportUserVipPackage(query) {
  return request({
    url: '/course/userVipPackage/export',
    method: 'get',
    params: query
  })
}