import request from '@/utils/request'

// 查询聊天角色列表
export function listChatRole(query) {
  return request({
    url: '/chat/chatRole/list',
    method: 'get',
    params: query
  })
}

export function getAllRoleList(query) {
  return request({
    url: '/chat/chatRole/getAllRoleList',
    method: 'get',
    params: query
  })
}


// 查询聊天角色详细
export function getChatRole(roleId) {
  return request({
    url: '/chat/chatRole/' + roleId,
    method: 'get'
  })
}

// 新增聊天角色
export function addChatRole(data) {
  return request({
    url: '/chat/chatRole',
    method: 'post',
    data: data
  })
}

// 修改聊天角色
export function updateChatRole(data) {
  return request({
    url: '/chat/chatRole',
    method: 'put',
    data: data
  })
}

// 删除聊天角色
export function delChatRole(roleId) {
  return request({
    url: '/chat/chatRole/' + roleId,
    method: 'delete'
  })
}

// 导出聊天角色
export function exportChatRole(query) {
  return request({
    url: '/chat/chatRole/export',
    method: 'get',
    params: query
  })
}