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

@@ -1,19 +1,17 @@
using EnvelopeGenerator.Domain;
namespace EnvelopeGenerator.Application.DocStatus.Commands;
namespace EnvelopeGenerator.Application.DocStatus.Commands;
/// <summary>
///
/// </summary>
public class CreateDocStatusCommand : UpdateDocStatusCommand
public record CreateDocStatusCommand : ModifyDocStatusCommandBase
{
/// <summary>
/// Gets timestamp when this record was added. Returns the current date and time.
/// Gets timestamp when this record was added. Returns null.
/// </summary>
public DateTime AddedWhen => StatusChangedWhen;
public override DateTime? ChangedWhen => null;
/// <summary>
/// Gets timestamp when this record was added. Returns the current date and time.
/// Gets timestamp when this record was added. Returns the StatusChangedWhen value.
/// </summary>
public override DateTime? ChangedWhen { get; } = null;
public DateTime AddedWhen => StatusChangedWhen;
}