namespace PowderCoating.Core.Entities;
///
/// Company-specific job status lookup table.
/// Replaces hardcoded JobStatus enum to enable workflow customization.
///
public class JobStatusLookup : BaseEntity
{
///
/// Immutable status code used in code logic (e.g., "PENDING", "COATING", "COMPLETED").
/// Acts like the old enum name.
///
public string StatusCode { get; set; } = string.Empty;
///
/// User-customizable display name shown in UI (e.g., "In Progress", "Ready for Coating").
///
public string DisplayName { get; set; } = string.Empty;
///
/// Workflow sequence number for ordering statuses (1 = first, higher = later in workflow).
/// Replaces enum integer comparisons.
///
public int DisplayOrder { get; set; }
///
/// Bootstrap color class for badge styling (primary, secondary, success, danger, warning, info, dark).
/// Eliminates switch statement duplication for status colors.
///
public string ColorClass { get; set; } = "secondary";
///
/// Optional Bootstrap icon class (e.g., "bi-clock", "bi-paint-bucket", "bi-check-circle").
///
public string? IconClass { get; set; }
///
/// Whether this status is currently active and available for selection.
///
public bool IsActive { get; set; } = true;
///
/// System-defined statuses cannot be deleted (PENDING, COMPLETED, CANCELLED).
/// Prevents breaking workflow dependencies.
///
public bool IsSystemDefined { get; set; } = true;
///
/// Terminal statuses represent completed workflows (COMPLETED, DELIVERED, CANCELLED).
/// Used for reporting and filtering.
///
public bool IsTerminalStatus { get; set; } = false;
///
/// Work-in-progress statuses represent active production (SANDBLASTING, COATING, CURING, etc.).
/// Used for dashboard stats and capacity planning.
///
public bool IsWorkInProgressStatus { get; set; } = false;
///
/// Optional description explaining when to use this status.
///
public string? Description { get; set; }
///
/// Optional workflow category for grouping statuses (e.g., "Pre-Production", "Production", "Post-Production").
///
public string? WorkflowCategory { get; set; }
// Navigation properties
public virtual ICollection Jobs { get; set; } = new List();
public virtual ICollection FromStatusHistory { get; set; } = new List();
public virtual ICollection ToStatusHistory { get; set; } = new List();
}