QueueJob - model and DB migration
This commit is contained in:
@@ -11,7 +11,8 @@ public enum LogType {
|
||||
Backup,
|
||||
Process,
|
||||
PowerBi,
|
||||
DataInbox
|
||||
DataInbox,
|
||||
Queue
|
||||
}
|
||||
public class LogEntry
|
||||
{
|
||||
|
||||
29
WebAPI/Models/QueueJob.cs
Normal file
29
WebAPI/Models/QueueJob.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace WebAPI.Models;
|
||||
|
||||
public enum JobStatus
|
||||
{
|
||||
New,
|
||||
Failed,
|
||||
Success
|
||||
}
|
||||
|
||||
public enum JobType
|
||||
{
|
||||
ImportWorker,
|
||||
ProcessWorker
|
||||
}
|
||||
|
||||
public class QueueJob
|
||||
{
|
||||
[Key] public Guid Id { get; set; }
|
||||
[Required] public Guid LayerId { get; set; }
|
||||
[Required] public int Attempts { get; set; }
|
||||
[Required] public JobStatus Status { get; set; } = JobStatus.New;
|
||||
[Required] public JobType Type { get; set; } = JobType.ImportWorker;
|
||||
public string Message { get; set; } = string.Empty;
|
||||
[Required] public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
[Required] public DateTime ModifiedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
Reference in New Issue
Block a user