Files
jobtrackingapp/JobTrackerApi/Models/EmailSendAttempt.cs
T
cesnimda aff34cc645
CI and Deploy / test (pull_request) Failing after 4m32s
CI and Deploy / deploy (pull_request) Has been skipped
feat(email): export send attempt metadata
Add content-free provider delivery history to encrypted and daily owner exports, exclude payload hashes, and lock in tenant-safe hard-delete cascades.
2026-08-10 00:48:32 +02:00

40 lines
1.3 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; }
}
public sealed record EmailSendAttemptExport(
Guid Id,
int JobApplicationId,
string Provider,
string ClientRequestId,
string Status,
string? ProviderMessageId,
string? FailureCategory,
DateTime CreatedAtUtc,
DateTime? StartedAtUtc,
DateTime? CompletedAtUtc);