using EnvelopeGenerator.Application.Common.Model; using EnvelopeGenerator.Domain.Constants; namespace EnvelopeGenerator.Application.DocStatus.Commands; /// /// /// public record ModifyDocStatusCommandBase : EnvelopeReceiverQueryBase { /// /// Gets the current status code. /// public DocumentStatus Status => Value is null ? DocumentStatus.Created : DocumentStatus.Signed; /// /// Gets or sets the display value associated with the status. /// public string? Value { get; set; } /// /// Gets timestamp when this record was added. /// public DateTime StatusChangedWhen { get; } = DateTime.Now; /// /// Maps the current command to a new instance of the specified type. /// /// /// public TDest To() where TDest : ModifyDocStatusCommandBase, new() => new() { Key = Key, Envelope = Envelope, Receiver = Receiver, Value = Value }; }