namespace ControlCenter.Api.Entities;
///
/// Represents an agent's current state in the Control Center.
/// Each row tracks one agent session's status, task, and activity.
///
public class Agent
{
///
/// Primary key — UUID generated on insert.
///
public Guid Id { get; set; }
///
/// Current operational status of the agent.
/// Stored as an enum in PostgreSQL via Npgsql.
///
public AgentStatus Status { get; set; } = AgentStatus.Idle;
///
/// Description of the agent's current task, if any.
/// Nullable — not all agents have an active task.
///
public string? Task { get; set; }
///
/// Task progress percentage (0–100).
/// Nullable — progress is only meaningful when an agent has a trackable task.
///
public int? Progress { get; set; }
///
/// Full session key, e.g. "agent:otto:telegram:direct:8787451565".
/// Not null — every agent row must be associated with a session.
///
public string SessionKey { get; set; } = string.Empty;
///
/// Communication channel the agent is operating on, e.g. "telegram", "discord", "slack".
/// Not null — every agent session operates on exactly one channel.
///
public string Channel { get; set; } = string.Empty;
///
/// Timestamp of the agent's last activity.
/// Default: current UTC timestamp on insert.
///
public DateTime LastActivity { get; set; } = DateTime.UtcNow;
///
/// Row creation timestamp. Set automatically on insert.
///
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
///
/// Row last-update timestamp. Updated automatically on any modification.
///
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}