- Updated `ReadEmailTemplateQuery` to implement `IRequest<ReadEmailTemplateResponse?>`. - Changed `ReadEmailTemplateResponse` from a record to a class with updated properties. - Enhanced `EmailTemplateController` to inject `IEmailTemplateRepository` and `IMediator`, and made the `Get` method asynchronous. - Introduced `ReadEmailTemplateMappingProfile` for AutoMapper mappings. - Added `ReadEmailTemplateQueryHandler` to manage query logic and response mapping. These changes improve the structure and maintainability of the email template querying process.
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
namespace EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
|
|
|
|
/// <summary>
|
|
/// Stellt die Antwort für eine Abfrage von E-Mail-Vorlagen bereit.
|
|
/// </summary>
|
|
public class ReadEmailTemplateResponse
|
|
{
|
|
/// <summary>
|
|
/// Die eindeutige Kennung der E-Mail-Vorlage.
|
|
/// </summary>
|
|
public int Id { get; init; }
|
|
|
|
/// <summary>
|
|
/// Der Typ der E-Mail-Vorlage.
|
|
/// </summary>
|
|
public int Type { get; init; }
|
|
|
|
/// <summary>
|
|
/// Das Datum und die Uhrzeit, wann die Vorlage hinzugefügt wurde.
|
|
/// </summary>
|
|
public DateTime AddedWhen { get; init; }
|
|
|
|
/// <summary>
|
|
/// Der Inhalt (Body) der E-Mail-Vorlage. Kann null sein.
|
|
/// </summary>
|
|
public string? Body { get; set; }
|
|
|
|
/// <summary>
|
|
/// Der Betreff der E-Mail-Vorlage. Kann null sein.
|
|
/// </summary>
|
|
public string? Subject { get; set; }
|
|
|
|
/// <summary>
|
|
/// Das Datum und die Uhrzeit, wann die Vorlage zuletzt geändert wurde. Kann null sein.
|
|
/// </summary>
|
|
public DateTime? ChangedWhen { get; set; }
|
|
}
|