using EnvelopeGenerator.Application.Common.Query; using EnvelopeGenerator.Domain.Constants; namespace EnvelopeGenerator.Application.DocStatus.Commands; /// /// /// public record ModifyDocStatusCommandBase : EnvelopeReceiverQueryBase { /// /// /// public int? EnvelopeId => Envelope.Id; /// /// /// public int? ReceiverId => Receiver.Id; /// /// /// public override ReceiverQueryBase Receiver { get => base.Receiver; set => base.Receiver = value; } /// /// 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 }; }