import request from '@/utils/request'

export function listChannel(query) {
  return request({
    url: '/channel/list',
    method: 'get',
    params: query
  })
}

export function createChannel(data) {
  return request({
    url: '/channel/create',
    method: 'post',
    data
  })
}

export function allChannel(data) {
  return request({
    url: '/channel/all',
    method: 'get'
  })
}

export function readChannel(query) {
  return request({
    url: '/channel/read',
    method: 'get',
    params: query
  })
}

export function updateChannel(data) {
  return request({
    url: '/channel/update',
    method: 'post',
    data
  })
}

export function deleteChannel(data) {
  return request({
    url: '/channel/delete',
    method: 'post',
    data
  })
}
