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:
32
ExportDXF/Models/BomItem.cs
Normal file
32
ExportDXF/Models/BomItem.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
||||||
22
ExportDXF/Models/LogEvent.cs
Normal file
22
ExportDXF/Models/LogEvent.cs
Normal 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; } = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user