import { request } from '../config'

export function listTopic(params: any) {
  return request({
    url: '/topic/list',
    method: 'get',
    params
  })
}

export function createTopic(data: any) {
  return request({
    url: '/topic/create',
    method: 'post',
    data
  })
}

export function readTopic(params: any) {
  return request({
    url: '/topic/read',
    method: 'get',
    params
  })
}

export function updateTopic(data: any) {
  return request({
    url: '/topic/update',
    method: 'post',
    data
  })
}

export function deleteTopic(data: any) {
  return request({
    url: '/topic/delete',
    method: 'post',
    data
  })
}

export function batchDeleteTopic(data: any) {
  return request({
    url: '/topic/batch-delete',
    method: 'post',
    data
  })
}
