Multi-agent AI laboratory with ASP.NET Core 8.0 backend and Flutter frontend. Implements CQRS architecture, OpenAPI contract-first API design. BACKEND: Agent management, conversations, executions with PostgreSQL + Ollama FRONTEND: Cross-platform UI with strict typing and Result-based error handling Co-Authored-By: Jean-Philippe Brule <jp@svrnty.io>
55 lines
1.6 KiB
C#
55 lines
1.6 KiB
C#
namespace Codex.Dal.Entities;
|
|
|
|
/// <summary>
|
|
/// Represents a conversation grouping multiple messages together.
|
|
/// Provides conversation-level metadata and tracking.
|
|
/// </summary>
|
|
public class Conversation
|
|
{
|
|
/// <summary>
|
|
/// Unique identifier for the conversation
|
|
/// </summary>
|
|
public Guid Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Title or summary of the conversation (can be auto-generated from first message)
|
|
/// </summary>
|
|
public string Title { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Brief summary of the conversation topic or purpose
|
|
/// </summary>
|
|
public string? Summary { get; set; }
|
|
|
|
/// <summary>
|
|
/// When the conversation was started
|
|
/// </summary>
|
|
public DateTime StartedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
/// <summary>
|
|
/// When the last message was added to this conversation
|
|
/// </summary>
|
|
public DateTime LastMessageAt { get; set; } = DateTime.UtcNow;
|
|
|
|
/// <summary>
|
|
/// Whether this conversation is currently active
|
|
/// </summary>
|
|
public bool IsActive { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Total number of messages in this conversation
|
|
/// </summary>
|
|
public int MessageCount { get; set; } = 0;
|
|
|
|
// Navigation properties
|
|
/// <summary>
|
|
/// All messages in this conversation
|
|
/// </summary>
|
|
public ICollection<ConversationMessage> Messages { get; set; } = new List<ConversationMessage>();
|
|
|
|
/// <summary>
|
|
/// Agent executions that are part of this conversation
|
|
/// </summary>
|
|
public ICollection<AgentExecution> Executions { get; set; } = new List<AgentExecution>();
|
|
}
|