Initial commit

This commit is contained in:
2026-04-23 21:38:24 -04:00
commit 63e12a9636
1762 changed files with 1672620 additions and 0 deletions
@@ -0,0 +1,74 @@
namespace PowderCoating.Core.Entities;
/// <summary>
/// Company-specific job status lookup table.
/// Replaces hardcoded JobStatus enum to enable workflow customization.
/// </summary>
public class JobStatusLookup : BaseEntity
{
/// <summary>
/// Immutable status code used in code logic (e.g., "PENDING", "COATING", "COMPLETED").
/// Acts like the old enum name.
/// </summary>
public string StatusCode { get; set; } = string.Empty;
/// <summary>
/// User-customizable display name shown in UI (e.g., "In Progress", "Ready for Coating").
/// </summary>
public string DisplayName { get; set; } = string.Empty;
/// <summary>
/// Workflow sequence number for ordering statuses (1 = first, higher = later in workflow).
/// 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 status colors.
/// </summary>
public string ColorClass { get; set; } = "secondary";
/// <summary>
/// Optional Bootstrap icon class (e.g., "bi-clock", "bi-paint-bucket", "bi-check-circle").
/// </summary>
public string? IconClass { get; set; }
/// <summary>
/// Whether this status is currently active and available for selection.
/// </summary>
public bool IsActive { get; set; } = true;
/// <summary>
/// System-defined statuses cannot be deleted (PENDING, COMPLETED, CANCELLED).
/// Prevents breaking workflow dependencies.
/// </summary>
public bool IsSystemDefined { get; set; } = true;
/// <summary>
/// Terminal statuses represent completed workflows (COMPLETED, DELIVERED, CANCELLED).
/// Used for reporting and filtering.
/// </summary>
public bool IsTerminalStatus { get; set; } = false;
/// <summary>
/// Work-in-progress statuses represent active production (SANDBLASTING, COATING, CURING, etc.).
/// Used for dashboard stats and capacity planning.
/// </summary>
public bool IsWorkInProgressStatus { get; set; } = false;
/// <summary>
/// Optional description explaining when to use this status.
/// </summary>
public string? Description { get; set; }
/// <summary>
/// Optional workflow category for grouping statuses (e.g., "Pre-Production", "Production", "Post-Production").
/// </summary>
public string? WorkflowCategory { get; set; }
// Navigation properties
public virtual ICollection<Job> Jobs { get; set; } = new List<Job>();
public virtual ICollection<JobStatusHistory> FromStatusHistory { get; set; } = new List<JobStatusHistory>();
public virtual ICollection<JobStatusHistory> ToStatusHistory { get; set; } = new List<JobStatusHistory>();
}