import request from '@/utils/request'

// 查询课程收藏列表
export function listUserCourseFavorite(query) {
  return request({
    url: '/course/userCourseFavorite/list',
    method: 'get',
    params: query
  })
}

// 查询课程收藏详细
export function getUserCourseFavorite(favoriteId) {
  return request({
    url: '/course/userCourseFavorite/' + favoriteId,
    method: 'get'
  })
}

// 新增课程收藏
export function addUserCourseFavorite(data) {
  return request({
    url: '/course/userCourseFavorite',
    method: 'post',
    data: data
  })
}

// 修改课程收藏
export function updateUserCourseFavorite(data) {
  return request({
    url: '/course/userCourseFavorite',
    method: 'put',
    data: data
  })
}

// 删除课程收藏
export function delUserCourseFavorite(favoriteId) {
  return request({
    url: '/course/userCourseFavorite/' + favoriteId,
    method: 'delete'
  })
}

// 导出课程收藏
export function exportUserCourseFavorite(query) {
  return request({
    url: '/course/userCourseFavorite/export',
    method: 'get',
    params: query
  })
}