From 6611b92fdba59732ffcfb73f551eb5b4b0acd1ac Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 6 Feb 2026 14:14:31 +0100 Subject: [PATCH] Update EmailTemplateDto: add timestamps, make fields nullable Removed ApiExplorerSettings attribute. Changed Body and Subject to nullable strings with init accessors and updated their documentation. Added AddedWhen and ChangedWhen timestamp properties to track template creation and modification dates. Cleaned up property formatting. --- .../Common/Dto/EmailTemplateDto.cs | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/EnvelopeGenerator.Application/Common/Dto/EmailTemplateDto.cs b/EnvelopeGenerator.Application/Common/Dto/EmailTemplateDto.cs index 5dc7f3b9..6998c1d7 100644 --- a/EnvelopeGenerator.Application/Common/Dto/EmailTemplateDto.cs +++ b/EnvelopeGenerator.Application/Common/Dto/EmailTemplateDto.cs @@ -5,13 +5,12 @@ namespace EnvelopeGenerator.Application.Common.Dto /// /// /// - [ApiExplorerSettings(IgnoreApi = true)] public record EmailTemplateDto { /// /// /// - public int Id{ get; init; } + public int Id { get; init; } /// /// @@ -19,13 +18,23 @@ namespace EnvelopeGenerator.Application.Common.Dto public required string Name { get; init; } /// - /// + /// Das Datum und die Uhrzeit, wann die Vorlage hinzugefügt wurde. /// - public required string Body { get; set; } + public DateTime AddedWhen { get; init; } /// - /// + /// Der Inhalt (Body) der E-Mail-Vorlage. Kann null sein. + /// + public string? Body { get; init; } + + /// + /// Der Betreff der E-Mail-Vorlage. Kann null sein. + /// + public string? Subject { get; init; } + + /// + /// Das Datum und die Uhrzeit, wann die Vorlage zuletzt geändert wurde. Kann null sein. /// - public required string Subject { get; set; } + public DateTime? ChangedWhen { get; init; } }; } \ No newline at end of file