package domain

import "time"

// ConversationID is a strongly-typed identifier for conversations.
type ConversationID string

// MessageID is a strongly-typed identifier for messages.
type MessageID string

// MessageRole represents who sent the message.
type MessageRole string

const (
	MessageRoleUser      MessageRole = "user"
	MessageRoleAssistant MessageRole = "assistant"
	MessageRoleSystem    MessageRole = "system"
)

// Conversation represents a chat conversation for a project.
type Conversation struct {
	ID          ConversationID
	ProjectID   string
	Title       string
	CreatedAt   time.Time
	UpdatedAt   time.Time
	LastMessage *time.Time
}

// Message represents a single message in a conversation.
type Message struct {
	ID             MessageID
	ConversationID ConversationID
	Role           MessageRole
	Content        string
	CreatedAt      time.Time
}

// ConversationWithMessages combines a conversation with its messages.
type ConversationWithMessages struct {
	Conversation
	Messages []*Message
}
