Files
ai-customer-service/internal/domain/session/session.go
Your Name 06eeb5776b
Some checks failed
CI / verify (push) Failing after 24s
style(go): apply gofmt to repository
2026-05-06 12:22:41 +08:00

30 lines
791 B
Go

package session
import "time"
type Status string
const (
StatusIdle Status = "idle"
StatusProcessing Status = "processing"
StatusHandoff Status = "handoff"
StatusClosed Status = "closed"
)
type MessageContext struct {
Direction string `json:"direction"`
Content string `json:"content"`
Timestamp time.Time `json:"timestamp"`
}
type Session struct {
ID string `json:"id"`
Channel string `json:"channel"`
OpenID string `json:"open_id"`
UserID string `json:"user_id,omitempty"`
Status Status `json:"status"`
TurnCount int `json:"turn_count"`
LastMessageAt time.Time `json:"last_message_at"`
Context []MessageContext `json:"context"`
}