Developer 02 10341fd3cc Refactor EmailTemplateDto and update command handler
The `EmailTemplateDto` class has been changed from a record with positional parameters to a class with explicit properties, including XML documentation and required modifiers for `Name`, `Body`, and `Subject`.

In the `ResetEnvelopeTemplateCommandHandler`, added necessary using directives, modified the constructor to accept an `IRepository<EmailTemplate>`, and updated the `Handle` method to read and update email templates based on the request's ID or type. The static `Default` collection has been renamed to `Defaults` and now uses `EmailTemplateDto`.
2025-05-06 20:58:52 +02:00

32 lines
701 B
C#

using DigitalData.Core.Abstractions;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs
{
/// <summary>
///
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
public record EmailTemplateDto : IUnique<int>
{
/// <summary>
///
/// </summary>
public int Id{ get; init; }
/// <summary>
///
/// </summary>
public required string Name { get; init; }
/// <summary>
///
/// </summary>
public required string Body { get; init; }
/// <summary>
///
/// </summary>
public required string Subject { get; init; }
};
}