feat(domain): add domain services and events
- MessageIdGenerator: Generates unique message IDs using legacy-compatible SHA256 hash Algorithm matches VB.NET system for duplicate detection - EmailProcessedEvent: MediatR domain event for email processing completion Domain services encapsulate business logic that doesn't belong to entities.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using MediatR;
|
||||
using DigitalData.EmailProfiler.Domain.Enums;
|
||||
|
||||
namespace DigitalData.EmailProfiler.Domain.Events;
|
||||
|
||||
public class EmailProcessedEvent : INotification
|
||||
{
|
||||
public int EmailHistoryId { get; }
|
||||
public int ProfileId { get; }
|
||||
public string MessageId { get; }
|
||||
public EmailStatus Status { get; }
|
||||
public DateTime ProcessedDate { get; }
|
||||
|
||||
public EmailProcessedEvent(int emailHistoryId, int profileId, string messageId, EmailStatus status)
|
||||
{
|
||||
EmailHistoryId = emailHistoryId;
|
||||
ProfileId = profileId;
|
||||
MessageId = messageId;
|
||||
Status = status;
|
||||
ProcessedDate = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user