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:
@@ -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; }
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
namespace DigitalData.MessagingService.Publisher.Abstraction;
|
||||
|
||||
namespace DigitalData.MessagingService.Publisher.Abstraction;
|
||||
|
||||
public class OutgoingEmailEvent
|
||||
public record OutgoingEmailEvent
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user