Refactor and add OutgoingEmailCreateDto record

Introduced a new namespace `DigitalData.MessagingService.Publisher.Abstraction` in `OutgoingEmailCreateDto.cs` and `OutgoingEmailEvent.cs`.

Added a new record `OutgoingEmailCreateDto` with properties for recipient, subject, body, HTML flag, and queue timestamp.

Converted `OutgoingEmailEvent` from a class to a record.

Removed the unnecessary `using System;` directive from `OutgoingEmailEvent.cs`.
This commit is contained in:
2026-07-29 13:43:21 +02:00
parent e78ceb522c
commit 2f39db94ca
2 changed files with 28 additions and 4 deletions

View File

@@ -0,0 +1,26 @@
namespace DigitalData.MessagingService.Publisher.Abstraction;
public record OutgoingEmailCreateDto
{
/// <summary>
/// Recipient email address
/// </summary>
public string Recipient { get; set; } = null!;
/// <summary>
/// Email subject
/// </summary>
public string Subject { get; set; } = null!;
/// <summary>
/// Email body (HTML or plain text)
/// </summary>
public string Body { get; set; } = null!;
/// <summary>
/// Is HTML email (default: true)
/// </summary>
public bool IsHtml { get; set; } = true;
public DateTime QueuedAt { get; set; }
}

View File

@@ -1,8 +1,6 @@
using System; namespace DigitalData.MessagingService.Publisher.Abstraction;
namespace DigitalData.MessagingService.Publisher.Abstraction; public record OutgoingEmailEvent
public class OutgoingEmailEvent
{ {
public Guid Id { get; set; } public Guid Id { get; set; }