import request from '@/utils/request'

// 查询聊天消息记录列表
export function listChatMsg(query) {
  return request({
    url: '/chat/chatMsg/list',
    method: 'get',
    params: query
  })
}

// 查询聊天消息记录详细
export function getChatMsg(msgId) {
  return request({
    url: '/chat/chatMsg/' + msgId,
    method: 'get'
  })
}

// 新增聊天消息记录
export function addChatMsg(data) {
  return request({
    url: '/chat/chatMsg',
    method: 'post',
    data: data
  })
}

// 修改聊天消息记录
export function updateChatMsg(data) {
  return request({
    url: '/chat/chatMsg',
    method: 'put',
    data: data
  })
}

// 删除聊天消息记录
export function delChatMsg(msgId) {
  return request({
    url: '/chat/chatMsg/' + msgId,
    method: 'delete'
  })
}

// 导出聊天消息记录
export function exportChatMsg(query) {
  return request({
    url: '/chat/chatMsg/export',
    method: 'get',
    params: query
  })
}
