namespace CommandForge.Domain;
///
/// A record of one finished command execution, persisted for the execution-history view.
///
public sealed record ExecutionRecord
{
/// The catalog id of the command that ran.
public required string CommandId { get; init; }
/// When the run finished (clock instant, with offset).
public required DateTimeOffset Timestamp { get; init; }
/// The process exit code.
public required int ExitCode { get; init; }
/// Whether the run was considered successful (exit 0 or the reboot-required code).
public required bool Success { get; init; }
/// Wall-clock duration in milliseconds.
public required long DurationMs { get; init; }
/// Whether the run signalled that a restart is required (e.g. exit code 3010).
public bool RequiresRestart { get; init; }
}