feat(email): add durable send ledger
Tracks only idempotency and delivery metadata; recipient, subject, and body are excluded. No provider send path is enabled.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace JobTrackerApi.Models;
|
||||
|
||||
public static class EmailSendStatuses
|
||||
{
|
||||
public const string Pending = "pending";
|
||||
public const string Sending = "sending";
|
||||
public const string Sent = "sent";
|
||||
public const string Failed = "failed";
|
||||
public const string Uncertain = "uncertain";
|
||||
}
|
||||
|
||||
public sealed class EmailSendAttempt
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string OwnerUserId { get; set; } = string.Empty;
|
||||
public int JobApplicationId { get; set; }
|
||||
public JobApplication JobApplication { get; set; } = null!;
|
||||
public string Provider { get; set; } = string.Empty;
|
||||
public string ClientRequestId { get; set; } = string.Empty;
|
||||
public string PayloadHash { get; set; } = string.Empty;
|
||||
public string Status { get; set; } = EmailSendStatuses.Pending;
|
||||
public string? ProviderMessageId { get; set; }
|
||||
public string? FailureCategory { get; set; }
|
||||
public DateTime CreatedAtUtc { get; set; }
|
||||
public DateTime? StartedAtUtc { get; set; }
|
||||
public DateTime? CompletedAtUtc { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user