import request from '@/utils/request'

// 查询对话关系列表
export function listSession(query) {
  return request({
    url: '/doctorChat/session/list',
    method: 'get',
    params: query
  })
}


export function listMsg(query) {
  return request({
    url: '/doctorChat/msg/list',
    method: 'get',
    params: query
  })
}

// 查询对话关系详细
export function getChatSession(sessionId) {
  return request({
    url: '/doctorChat/session/' + sessionId,
    method: 'get'
  })
}

// 新增对话关系
export function addSession(data) {
  return request({
    url: '/doctorChat/session',
    method: 'post',
    data: data
  })
}

// 修改对话关系
export function updateSession(data) {
  return request({
    url: '/doctorChat/session',
    method: 'put',
    data: data
  })
}

// 删除对话关系
export function delSession(sessionId) {
  return request({
    url: '/doctorChat/session/' + sessionId,
    method: 'delete'
  })
}

// 导出对话关系
export function exportSession(query) {
  return request({
    url: '/doctorChat/session/export',
    method: 'get',
    params: query
  })
}