18c9354095
- 注入数据库、运行时配置、统一响应、文件存储和平台 AI 能力,补充业务读写工具与客户快捷操作契约。 - 移除模块内重复的组织、客户、工单、标签、技能、旧工作流、MCP 和迁移实现,将身份权限与业务主体交由宿主管理。 - 使用 libSQL 重构向量存储,并完善图片消息、访客身份、排队调度、企业微信和支持聊天页面。 - 统一 HTTP、DTO 与 WebSocket 的 snake_case 协议,补齐模块初始化、业务动作和公共载荷等回归测试。
60 lines
4.0 KiB
Go
60 lines
4.0 KiB
Go
package response
|
|
|
|
import "code.tczkiot.com/wlw/ai-agent/internal/pkg/enums"
|
|
|
|
type ConversationParticipantResponse struct {
|
|
ID int64 `json:"id"`
|
|
ParticipantType string `json:"participant_type"`
|
|
ParticipantID int64 `json:"participant_id"`
|
|
ExternalParticipantID string `json:"external_participant_id,omitempty"`
|
|
JoinedAt string `json:"joined_at,omitempty"`
|
|
LeftAt string `json:"left_at,omitempty"`
|
|
Status enums.Status `json:"status"`
|
|
}
|
|
|
|
type ConversationResponse struct {
|
|
ID int64 `json:"id"`
|
|
AIAgentID int64 `json:"ai_agent_id"`
|
|
ChannelID int64 `json:"channel_id"`
|
|
CustomerType string `json:"customer_type"`
|
|
CustomerID int64 `json:"customer_id"`
|
|
CustomerExternalID string `json:"customer_external_id"`
|
|
CustomerName string `json:"customer_name"`
|
|
Status enums.IMConversationStatus `json:"status"`
|
|
ServiceMode enums.IMConversationServiceMode `json:"service_mode"`
|
|
Priority int `json:"priority"`
|
|
CurrentAssigneeID int64 `json:"current_assignee_id"`
|
|
CurrentAssigneeName string `json:"current_assignee_name,omitempty"`
|
|
CurrentTeamID int64 `json:"current_team_id"`
|
|
CurrentTeamName string `json:"current_team_name,omitempty"`
|
|
LastMessageID int64 `json:"last_message_id"`
|
|
LastMessageAt string `json:"last_message_at,omitempty"`
|
|
LastActiveAt string `json:"last_active_at,omitempty"`
|
|
LastMessageSummary string `json:"last_message_summary,omitempty"`
|
|
CustomerUnreadCount int `json:"customer_unread_count"`
|
|
AgentUnreadCount int `json:"agent_unread_count"`
|
|
CustomerLastReadMessageID int64 `json:"customer_last_read_message_id"`
|
|
CustomerLastReadAt string `json:"customer_last_read_at,omitempty"`
|
|
AgentLastReadMessageID int64 `json:"agent_last_read_message_id"`
|
|
AgentLastReadAt string `json:"agent_last_read_at,omitempty"`
|
|
CustomerOnline bool `json:"customer_online"`
|
|
QueueEnteredAt string `json:"queue_entered_at,omitempty"`
|
|
QueuePosition int `json:"queue_position"`
|
|
QueueAheadCount int `json:"queue_ahead_count"`
|
|
QueueWaitingCount int `json:"queue_waiting_count"`
|
|
QueueWaitSeconds int64 `json:"queue_wait_seconds"`
|
|
QueueEstimatedWaitSeconds int64 `json:"queue_estimated_wait_seconds"`
|
|
QueueEscalationLevel int `json:"queue_escalation_level"`
|
|
EffectivePriority int `json:"effective_priority"`
|
|
QueueServiceOnline bool `json:"queue_service_online"`
|
|
ClosedAt string `json:"closed_at,omitempty"`
|
|
ClosedBy int64 `json:"closed_by"`
|
|
ClosedByName string `json:"closed_by_name,omitempty"`
|
|
CloseReason string `json:"close_reason,omitempty"`
|
|
}
|
|
|
|
type ConversationDetailResponse struct {
|
|
ConversationResponse
|
|
Participants []ConversationParticipantResponse `json:"participants,omitempty"`
|
|
}
|