import request from '@/utils/request'

// 查询视频资源列表
export function listVideoResource(query) {
  return request({
    url: '/course/videoResource/list',
    method: 'get',
    params: query
  })
}

// 查询视频资源详细
export function getVideoResource(resourceId) {
  return request({
    url: '/course/videoResource/' + resourceId,
    method: 'get'
  })
}

// 新增视频资源
export function addVideoResource(data) {
  return request({
    url: '/course/videoResource',
    method: 'post',
    data: data
  })
}

// 修改视频资源
export function updateVideoResource(data) {
  return request({
    url: '/course/videoResource',
    method: 'put',
    data: data
  })
}

// 删除视频资源
export function deleteVideoResource(resourceId) {
  return request({
    url: '/course/videoResource/' + resourceId,
    method: 'delete'
  })
}

// 批量新增视频资源
export function batchAddVideoResource(data) {
  return request({
    url: '/course/videoResource/batchAddVideoResource',
    method: 'post',
    data: data
  })
}

