using EnvelopeGenerator.Application.Model; using EnvelopeGenerator.Domain; namespace EnvelopeGenerator.Application.DocStatus.Commands; /// /// /// public record ModifyDocStatusCommandBase : EnvelopeReceiverQuery { /// /// 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; /// /// Maps the current command to a new instance of the specified type. /// /// /// public TDest To() where TDest : ModifyDocStatusCommandBase, new() => new() { Key = Key, Envelope = Envelope, Receiver = Receiver, Value = Value }; } #region Queries /// /// Repräsentiert eine Abfrage für Umschläge. /// public record EnvelopeQuery { /// /// Die eindeutige Kennung des Umschlags. /// public int? Id { get; init; } /// /// Die universell eindeutige Kennung des Umschlags. /// public string? Uuid { get; set; } } /// /// Stellt eine Abfrage dar, um die Details eines Empfängers zu lesen. /// um spezifische Informationen über einen Empfänger abzurufen. /// public record ReceiverQuery { /// /// ID des Empfängers /// public int? Id { get; init; } /// /// E-Mail Adresse des Empfängers /// public string? EmailAddress { get; init; } /// /// Eindeutige Signatur des Empfängers /// public string? Signature { get; set; } } #endregion