Files
PowderCoatingLogix/src/PowderCoating.Core/Entities/JobPriorityLookup.cs
T
2026-04-23 21:38:24 -04:00

55 lines
1.8 KiB
C#

namespace PowderCoating.Core.Entities;
/// <summary>
/// Company-specific job priority lookup table.
/// Replaces hardcoded JobPriority enum to enable priority customization.
/// </summary>
public class JobPriorityLookup : BaseEntity
{
/// <summary>
/// Immutable priority code used in code logic (e.g., "LOW", "NORMAL", "URGENT", "RUSH").
/// Acts like the old enum name.
/// </summary>
public string PriorityCode { get; set; } = string.Empty;
/// <summary>
/// User-customizable display name shown in UI (e.g., "Standard", "Expedited", "Emergency").
/// </summary>
public string DisplayName { get; set; } = string.Empty;
/// <summary>
/// Priority level for sorting (1 = lowest priority, 5 = highest priority).
/// Replaces enum integer comparisons.
/// </summary>
public int DisplayOrder { get; set; }
/// <summary>
/// Bootstrap color class for badge styling (primary, secondary, success, danger, warning, info, dark).
/// Eliminates switch statement duplication for priority colors.
/// </summary>
public string ColorClass { get; set; } = "secondary";
/// <summary>
/// Optional Bootstrap icon class (e.g., "bi-arrow-up", "bi-exclamation-triangle").
/// </summary>
public string? IconClass { get; set; }
/// <summary>
/// Whether this priority is currently active and available for selection.
/// </summary>
public bool IsActive { get; set; } = true;
/// <summary>
/// System-defined priorities cannot be deleted.
/// </summary>
public bool IsSystemDefined { get; set; } = true;
/// <summary>
/// Optional description explaining when to use this priority level.
/// </summary>
public string? Description { get; set; }
// Navigation properties
public virtual ICollection<Job> Jobs { get; set; } = new List<Job>();
}