feat: Add optimization result persistence to Job entity

Add OptimizationResultJson and OptimizedAt columns to Job table.
JobService now saves/clears optimization results and auto-clears
stale results when parts, stock, or cutting tool change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 22:12:38 -05:00
parent 8926d44969
commit c5f366a3ef
6 changed files with 992 additions and 1 deletions

View File

@@ -234,6 +234,8 @@ public class ApplicationDbContext : DbContext
entity.Property(e => e.Customer).HasMaxLength(100);
entity.Property(e => e.CreatedAt).HasDefaultValueSql("GETUTCDATE()");
entity.Property(e => e.OptimizationResultJson).HasColumnType("nvarchar(max)");
entity.HasIndex(e => e.JobNumber).IsUnique();
entity.HasOne(e => e.CuttingTool)