80b5532c2f
Persist and export each draft's idempotency UUID so refresh and edits cannot create a fresh delivery identity. Add reversible provider-specific migration SQL.
32 lines
1016 B
C#
32 lines
1016 B
C#
namespace JobTrackerApi.Models;
|
|
|
|
public sealed class EmailDraft
|
|
{
|
|
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 To { get; set; } = string.Empty;
|
|
public string Subject { get; set; } = string.Empty;
|
|
public string BodyText { get; set; } = string.Empty;
|
|
public string? ThreadId { get; set; }
|
|
public string ClientRequestId { get; set; } = string.Empty;
|
|
public long Revision { get; set; } = 1;
|
|
public DateTime CreatedAtUtc { get; set; }
|
|
public DateTime UpdatedAtUtc { get; set; }
|
|
}
|
|
|
|
public sealed record EmailDraftExport(
|
|
Guid Id,
|
|
int JobApplicationId,
|
|
string Provider,
|
|
string To,
|
|
string Subject,
|
|
string BodyText,
|
|
string? ThreadId,
|
|
string ClientRequestId,
|
|
long Revision,
|
|
DateTime CreatedAtUtc,
|
|
DateTime UpdatedAtUtc);
|