narasiahli-be/app/module/ai_chat/response/ai_chat.response.go

63 lines
1.8 KiB
Go

package response
import (
"time"
)
// AI Chat Sessions Response DTOs
type AIChatSessionsResponse struct {
ID uint `json:"id"`
AISessionID string `json:"aiSessionId"`
UserID uint `json:"userId"`
AgentID *string `json:"agentId"`
Title string `json:"title"`
MessageCount int `json:"messageCount"`
Status string `json:"status"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
// Nested user info
User *UserBasicInfo `json:"user,omitempty"`
// Last message preview
LastMessage *AIChatMessagesResponse `json:"lastMessage,omitempty"`
}
// AI Chat Messages Response DTOs
type AIChatMessagesResponse struct {
ID uint `json:"id"`
SessionID uint `json:"sessionId"`
MessageType string `json:"messageType"`
Content string `json:"content"`
CreatedAt time.Time `json:"createdAt"`
}
type UserBasicInfo struct {
ID uint `json:"id"`
Username string `json:"username"`
Fullname string `json:"fullname"`
Email string `json:"email"`
}
// Session with messages
type AIChatSessionWithMessagesResponse struct {
Session *AIChatSessionsResponse `json:"session"`
Messages []*AIChatMessagesResponse `json:"messages"`
Pagination interface{} `json:"pagination"`
}
// AI Chat Logs Response DTOs
type AIChatLogsResponse struct {
ID uint `json:"id"`
UserID uint `json:"userId"`
SessionID uint `json:"sessionId"`
StartDate time.Time `json:"startDate"`
EndDate *time.Time `json:"endDate"`
TotalDuration int64 `json:"totalDuration"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
// Nested user info
User *UserBasicInfo `json:"user,omitempty"`
}