feat(ModifyDocStatusCommandBase): create abstract class to handle common properties of commands

This commit is contained in:
2025-08-25 11:16:57 +02:00
parent 811656c4ca
commit 996b544633
3 changed files with 61 additions and 36 deletions

View File

@@ -5,35 +5,10 @@ namespace EnvelopeGenerator.Application.DocStatus.Commands;
/// <summary>
///
/// </summary>
public class UpdateDocStatusCommand
public record UpdateDocStatusCommand : ModifyDocStatusCommandBase
{
/// <summary>
/// Gets or sets the ID of the associated envelope.
/// Gets timestamp when this record was added. Returns the StatusChangedWhen value.
/// </summary>
public int EnvelopeId { get; set; }
/// <summary>
/// Gets or sets the ID of the receiver associated with this status.
/// </summary>
public int ReceiverId { get; set; }
/// <summary>
/// Gets the current status code.
/// </summary>
public Constants.DocumentStatus Status => Value is null ? Constants.DocumentStatus.Created : Constants.DocumentStatus.Signed;
/// <summary>
/// Gets the timestamp when the status was changed. Retrns the AddedWhen value.
/// </summary>
public DateTime StatusChangedWhen { get; } = DateTime.Now;
/// <summary>
/// Gets or sets the display value associated with the status.
/// </summary>
public string? Value { get; set; }
/// <summary>
/// Gets timestamp when this record was added. Returns the current date and time.
/// </summary>
public virtual DateTime? ChangedWhen { get; } = DateTime.Now;
public override DateTime? ChangedWhen => StatusChangedWhen;
}