Files
DiunaBI/DiunaBI.Domain/Entities/QueueJob.cs

39 lines
1.1 KiB
C#
Raw Normal View History

using System;
using System.ComponentModel.DataAnnotations;
2025-11-05 20:50:25 +01:00
namespace DiunaBI.Domain.Entities;
public class QueueJob
{
public Guid Id { get; set; } = Guid.NewGuid();
public Guid LayerId { get; set; }
public string LayerName { get; set; } = string.Empty;
public string PluginName { get; set; } = string.Empty;
public JobType JobType { get; set; }
public int Priority { get; set; } = 0; // 0 = highest priority
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
2025-12-08 21:54:48 +01:00
public DateTime ModifiedAt { get; set; } = DateTime.UtcNow;
public int RetryCount { get; set; } = 0;
public int MaxRetries { get; set; } = 5;
public JobStatus Status { get; set; } = JobStatus.Pending;
public string? LastError { get; set; }
public DateTime? LastAttemptAt { get; set; }
public DateTime? CompletedAt { get; set; }
public Guid CreatedById { get; set; }
public Guid ModifiedById { get; set; }
}
public enum JobType
{
Import = 0,
Process = 1
}
public enum JobStatus
{
Pending,
Running,
Completed,
Failed,
Retrying
}