feat: add BomItem and LogEvent models

Added BomItem model with sheet metal properties (thickness, k-factor, bend radius) and LogEvent model for structured logging with action tracking.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-03 06:46:11 -05:00
parent 84f0196c97
commit a32bbfa5d9
2 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using System;
namespace ExportDXF.Models
{
public class BomItem
{
public int ID { get; set; }
public string ItemNo { get; set; } = "";
public string PartNo { get; set; } = "";
public int SortOrder { get; set; }
public int? Qty { get; set; }
public int? TotalQty { get; set; }
public string Description { get; set; } = "";
public string PartName { get; set; } = "";
public string ConfigurationName { get; set; } = "";
public string Material { get; set; } = "";
public int DrawingID { get; set; }
public int? CutTemplateID { get; set; }
public string CutTemplateName { get; set; } = "";
// Sheet metal properties from CutTemplate
public double? Thickness { get; set; }
public double? KFactor { get; set; }
public double? DefaultBendRadius { get; set; }
}
public struct Size
{
public double Width { get; set; }
public double Height { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using System;
namespace ExportDXF.Models
{
public enum LogLevel { Info, Warning, Error }
public enum LogAction { Start, FindBom, CreateFlat, FlipView, SavePdf, UploadPdf, UploadDxf, CreateBomItem }
public sealed class LogEvent
{
public DateTime Time { get; set; } = DateTime.Now;
public LogLevel Level { get; set; }
public string Equipment { get; set; } = "";
public string Drawing { get; set; } = "";
public string Part { get; set; } = "";
public LogAction Action { get; set; }
public string Target { get; set; } = "";
public string Result { get; set; } = "OK";
public int DurationMs { get; set; }
public string Message { get; set; } = "";
}
}