diff --git a/EnvelopeGenerator.Application/DocStatus/Commands/CreateDocStatusCommand.cs b/EnvelopeGenerator.Application/DocStatus/Commands/CreateDocStatusCommand.cs index 461caffa..ba7e7dc5 100644 --- a/EnvelopeGenerator.Application/DocStatus/Commands/CreateDocStatusCommand.cs +++ b/EnvelopeGenerator.Application/DocStatus/Commands/CreateDocStatusCommand.cs @@ -5,35 +5,15 @@ namespace EnvelopeGenerator.Application.DocStatus.Commands; /// /// /// -public class CreateDocStatusCommand +public class CreateDocStatusCommand : UpdateDocStatusCommand { /// - /// Gets or sets the ID of the associated envelope. + /// Gets timestamp when this record was added. Returns the current date and time. /// - 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 the timestamp when the status was changed. Retrns the AddedWhen value. - /// - public DateTime? StatusChangedWhen => AddedWhen; + public DateTime AddedWhen => StatusChangedWhen; /// /// Gets timestamp when this record was added. Returns the current date and time. /// - public DateTime AddedWhen { get; } = DateTime.Now; - - /// - /// Gets or sets the display value associated with the status. - /// - public string? Value { get; set; } + public override DateTime? ChangedWhen { get; } = null; } \ No newline at end of file diff --git a/EnvelopeGenerator.Application/DocStatus/Commands/UpdateDocStatusCommand.cs b/EnvelopeGenerator.Application/DocStatus/Commands/UpdateDocStatusCommand.cs new file mode 100644 index 00000000..2b024baa --- /dev/null +++ b/EnvelopeGenerator.Application/DocStatus/Commands/UpdateDocStatusCommand.cs @@ -0,0 +1,39 @@ +using EnvelopeGenerator.Domain; + +namespace EnvelopeGenerator.Application.DocStatus.Commands; + +/// +/// +/// +public class UpdateDocStatusCommand +{ + /// + /// 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 the timestamp when the status was changed. Retrns the AddedWhen value. + /// + public DateTime StatusChangedWhen { get; } = DateTime.Now; + + /// + /// Gets or sets the display value associated with the status. + /// + public string? Value { get; set; } + + /// + /// Gets timestamp when this record was added. Returns the current date and time. + /// + public virtual DateTime? ChangedWhen { get; } = DateTime.Now; +} \ No newline at end of file