create UpdateDocStatusCommand

This commit is contained in:
tekh 2025-08-25 10:36:35 +02:00
parent 7e90d25f0b
commit 811656c4ca
2 changed files with 43 additions and 24 deletions

View File

@ -5,35 +5,15 @@ namespace EnvelopeGenerator.Application.DocStatus.Commands;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public class CreateDocStatusCommand public class CreateDocStatusCommand : UpdateDocStatusCommand
{ {
/// <summary> /// <summary>
/// Gets or sets the ID of the associated envelope. /// Gets timestamp when this record was added. Returns the current date and time.
/// </summary> /// </summary>
public int EnvelopeId { get; set; } public DateTime AddedWhen => StatusChangedWhen;
/// <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 => AddedWhen;
/// <summary> /// <summary>
/// Gets timestamp when this record was added. Returns the current date and time. /// Gets timestamp when this record was added. Returns the current date and time.
/// </summary> /// </summary>
public DateTime AddedWhen { get; } = DateTime.Now; public override DateTime? ChangedWhen { get; } = null;
/// <summary>
/// Gets or sets the display value associated with the status.
/// </summary>
public string? Value { get; set; }
} }

View File

@ -0,0 +1,39 @@
using EnvelopeGenerator.Domain;
namespace EnvelopeGenerator.Application.DocStatus.Commands;
/// <summary>
///
/// </summary>
public class UpdateDocStatusCommand
{
/// <summary>
/// Gets or sets the ID of the associated envelope.
/// </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;
}