- Updated namespace for `ResetEmailTemplateCommand` and added a constructor for flexible initialization. - Introduced `ChangedWhen` property in `UpdateEmailTemplateCommand` to track modification time. - Refactored `UpdateEmailTemplateCommandHandler` for improved email template retrieval logic. - Modified `EmailTemplateController` method signatures and logic for clarity and consistency. - Added `EmailTemplate` entry in `appsettings.json` for database trigger configuration.
42 lines
1.9 KiB
C#
42 lines
1.9 KiB
C#
using EnvelopeGenerator.Common;
|
|
using MediatR;
|
|
|
|
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
|
|
|
|
/// <summary>
|
|
/// Ein Befehl zum Zurücksetzen einer E-Mail-Vorlage auf die Standardwerte.
|
|
/// Erbt von <see cref="EmailTemplateQuery"/> und ermöglicht die Angabe einer optionalen ID und eines Typs der E-Mail-Vorlage.
|
|
/// </summary>
|
|
/// Beispiele:
|
|
/// 0 - DocumentReceived: Benachrichtigung über den Empfang eines Dokuments.
|
|
/// 1 - DocumentSigned: Benachrichtigung über die Unterzeichnung eines Dokuments.
|
|
/// 2 - DocumentDeleted: Benachrichtigung über das Löschen eines Dokuments.
|
|
/// 3 - DocumentCompleted: Benachrichtigung über den Abschluss eines Dokuments.
|
|
/// 4 - DocumentAccessCodeReceived: Benachrichtigung über den Erhalt eines Zugangscodes.
|
|
/// 5 - DocumentShared: Benachrichtigung über das Teilen eines Dokuments.
|
|
/// 6 - TotpSecret: Benachrichtigung über ein TOTP-Geheimnis.
|
|
/// 7 - DocumentRejected_ADM (Für den Absender): Mail an den Absender, wenn das Dokument abgelehnt wird.
|
|
/// 8 - DocumentRejected_REC (Für den ablehnenden Empfänger): Mail an den ablehnenden Empfänger, wenn das Dokument abgelehnt wird.
|
|
/// 9 - DocumentRejected_REC_2 (Für sonstige Empfänger): Mail an andere Empfänger (Brief), wenn das Dokument abgelehnt wird.
|
|
/// </param>
|
|
public record ResetEmailTemplateCommand : EmailTemplateQuery, IRequest
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="orginal"></param>
|
|
public ResetEmailTemplateCommand(EmailTemplateQuery? orginal = null) : base(orginal ?? new())
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="Id">Die optionale ID der E-Mail-Vorlage, die zurückgesetzt werden soll.</param>
|
|
/// <param name="Type">Der Typ der E-Mail-Vorlage, z. B. <see cref="Constants.EmailTemplateType"/> (optional).
|
|
public ResetEmailTemplateCommand(int? Id = null, Constants.EmailTemplateType? Type = null) : base(Id, Type)
|
|
{
|
|
}
|
|
};
|