using EnvelopeGenerator.Domain; namespace EnvelopeGenerator.Application.DocStatus.Commands; /// /// /// public abstract record ModifyDocStatusCommandBase { /// /// Gets or sets the ID of the associated envelope. /// public int EnvelopeId { get; set; } /// /// Gets or sets the ID of the receiver associated with this status. /// public int ReceiverId { get; set; } /// /// 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; /// /// Gets timestamp when this record was added. /// public abstract DateTime? ChangedWhen { get; } /// /// Maps the current command to a new instance of the specified type. /// /// /// public TDest To() where TDest : ModifyDocStatusCommandBase, new() => new() { EnvelopeId = EnvelopeId, ReceiverId = ReceiverId, Value = Value }; }