using System.ComponentModel.DataAnnotations; namespace ZymonicServices; [ZymonicLocalDbSet] public class ZymonicGatewayQueuedRequest { [Key] public Guid RequestId { get; set; } public ZymonicGatewayQueuedRequest() { if (RequestId == Guid.Empty) { RequestId = Guid.NewGuid(); } } public DateTime QueuedAtUtc { get; set; } = DateTime.UtcNow; public DateTime? StartedAtUtc { get; set; } public DateTime? CompletedAtUtc { get; set; } public DateTime? LastAttemptedAtUtc { get; set; } public int AttemptCount { get; set; } public string? Status { get; set; } = ZymonicGatewayQueueStatus.Queued; public string? Source { get; set; } public string? Route { get; set; } public string? EffectiveUser { get; set; } public string? AuthMethod { get; set; } public string? RequestPayloadJson { get; set; } public string? RequestMetadataJson { get; set; } public string? Error { get; set; } } public static class ZymonicGatewayQueueStatus { public const string Queued = "queued"; public const string InProgress = "in_progress"; public const string Completed = "completed"; public const string Failed = "failed"; }