import request from '@/utils/request'

// 查询直播间活动列表
export function listImLiveActivity(query) {
  return request({
    url: '/service/imLiveActivity/list',
    method: 'get',
    params: query
  })
}

// 查询直播间活动详细
export function getImLiveActivity(id) {
  return request({
    url: '/service/imLiveActivity/' + id,
    method: 'get'
  })
}

// 新增直播间活动
export function addImLiveActivity(data) {
  return request({
    url: '/service/imLiveActivity',
    method: 'post',
    data: data
  })
}

// 修改直播间活动
export function updateImLiveActivity(data) {
  return request({
    url: '/service/imLiveActivity',
    method: 'put',
    data: data
  })
}

// 删除直播间活动
export function delImLiveActivity(id) {
  return request({
    url: '/service/imLiveActivity/' + id,
    method: 'delete'
  })
}

export function endImLiveActivity(id) {
  return request({
    url: '/service/imLiveActivity/end/' + id,
    method: 'post'
  })
}