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

24 lines
1.3 KiB
C#

namespace PowderCoating.Core.Entities;
/// <summary>
/// Stores the raw AI prediction data captured at analysis time.
/// Both QuoteItem and JobItem carry a nullable FK to this table so the
/// same prediction record is shared when a quote converts to a job —
/// no duplication, clean lineage for reporting.
/// </summary>
public class AiItemPrediction : BaseEntity
{
// Raw AI predictions — captured once, never mutated
public decimal PredictedSurfaceAreaSqFt { get; set; }
public int PredictedMinutes { get; set; }
public string PredictedComplexity { get; set; } = "Moderate"; // Simple|Moderate|Complex|Extreme
public decimal PredictedUnitPrice { get; set; } // EstimatedUnitPrice shown to user in wizard
public string Confidence { get; set; } = "Medium"; // Low|Medium|High
public string? Reasoning { get; set; } // AI explanation text
public string? AiTags { get; set; } // Comma-separated tags from fixed taxonomy
public int ConversationRounds { get; set; } = 1; // How many follow-up rounds were needed
// Set when the item is saved: was the AI surface area or price overridden by the user?
public bool UserOverrodeEstimate { get; set; }
}