653f011be2
Tracks only idempotency and delivery metadata; recipient, subject, and body are excluded. No provider send path is enabled.
28 lines
1.0 KiB
C#
28 lines
1.0 KiB
C#
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; }
|
|
}
|