Refactor code structure for improved readability and maintainability
This commit is contained in:
46
Models/DeploymentJobModel.cs
Normal file
46
Models/DeploymentJobModel.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Microsoft.SelfService.Portal.Core.API.Models
|
||||
{
|
||||
public class QueueJobModel : BaseModel
|
||||
{
|
||||
[Column(Order = 1)]
|
||||
public string Type { get; set; }
|
||||
|
||||
[Column(Order = 2)]
|
||||
public string Status { get; set; } = QueueJobStatus.Pending;
|
||||
|
||||
[Column(Order = 3)]
|
||||
public string PayloadJson { get; set; }
|
||||
|
||||
[Column(Order = 4)]
|
||||
public int Attempts { get; set; }
|
||||
|
||||
[Column(Order = 5)]
|
||||
public int MaxAttempts { get; set; } = 3;
|
||||
|
||||
[Column(Order = 6)]
|
||||
public DateTime? Started { get; set; }
|
||||
|
||||
[Column(Order = 7)]
|
||||
public DateTime? Finished { get; set; }
|
||||
|
||||
[Column(Order = 8)]
|
||||
public DateTime? LockedUntil { get; set; }
|
||||
|
||||
[Column(Order = 9)]
|
||||
public string? LockedBy { get; set; }
|
||||
|
||||
[Column(Order = 10)]
|
||||
public string? ErrorMessage { get; set; }
|
||||
|
||||
[Column(Order = 11)]
|
||||
public string? MetadataJson { get; set; }
|
||||
|
||||
[Column(Order = 12)]
|
||||
public string? RuleSnapshotJson { get; set; }
|
||||
|
||||
public ICollection<QueueJobTargetModel> Targets { get; set; } = new List<QueueJobTargetModel>();
|
||||
public ICollection<QueueJobStepModel> Steps { get; set; } = new List<QueueJobStepModel>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user