using EnvelopeGenerator.Application.Model;
using EnvelopeGenerator.Domain;
namespace EnvelopeGenerator.Application.DocStatus.Commands;
///
///
///
public record ModifyDocStatusCommandBase : EnvelopeReceiverQueryBase
{
///
/// Gets the current status code.
///
public Constants.DocumentStatus Status => Value is null ? Constants.DocumentStatus.Created : Constants.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
};
}