namespace PlanTempus.Core.CommandQueries; /// /// Represents a response to a command request, typically used in asynchronous operations. /// This class includes details such as a unique request ID, correlation ID, command name, /// transaction ID, creation timestamp, and a URL to check the status of the command. /// /// A unique identifier used to track the request across services. /// The name of the command being executed. /// An optional unique identifier for the transaction associated with the command. public class CommandResponse(Guid correlationId, string commandName, Guid? transactionId) { /// /// A unique identifier for the request. This is automatically generated using Guid.CreateVersion7(). /// public Guid RequestId { get; } = Guid.CreateVersion7(); /// /// A unique identifier used to track the request across services. This is provided when creating the response. /// public Guid CorrelationId { get; } = correlationId; /// /// The name of the command being executed. /// public string CommandName { get; } = commandName; /// /// An optional unique identifier for the transaction associated with the command. /// public Guid? TransactionId { get; } = transactionId; /// /// The timestamp when the command response was created. This is automatically set to the current UTC time. /// public DateTime CreatedAt { get; } = DateTime.UtcNow; /// /// A URL where the client can check the status of the command. This is typically used in asynchronous operations. /// public string StatusUrl { get; } = "statusUrl"; }