namespace Extrudex.API.DTOs.PrintJobs; /// /// Response DTO for the cost summary of a print job. /// Provides a breakdown of material cost based on filament usage /// and spool pricing data. If cost data is incomplete, warnings /// are returned instead of throwing an error. /// public class CostSummaryResponse { /// Unique identifier of the print job. public Guid PrintJobId { get; set; } /// Human-readable name of the print job. public string PrintName { get; set; } = string.Empty; /// Foreign key to the spool used for this print job. public Guid SpoolId { get; set; } /// Serial number of the spool. public string SpoolSerial { get; set; } = string.Empty; /// Brand of the spool. public string SpoolBrand { get; set; } = string.Empty; /// Color name of the spool. public string SpoolColorName { get; set; } = string.Empty; /// Total millimeters of filament extruded during this print. public decimal MmExtruded { get; set; } /// Derived grams consumed for this print job. public decimal GramsDerived { get; set; } /// Purchase price of the full spool, if available. public decimal? SpoolPurchasePrice { get; set; } /// Total weight of the spool in grams when full. public decimal? SpoolWeightTotalGrams { get; set; } /// Calculated price per gram (purchase price / total weight), if available. public decimal? PricePerGram { get; set; } /// Calculated total material cost for this print job, if available. public decimal? TotalMaterialCost { get; set; } /// The CostPerPrint stored on the print job entity, if set. public decimal? StoredCostPerPrint { get; set; } /// /// Warnings about missing data that prevent cost calculation. /// Empty if all data is available and cost was calculated successfully. /// public List Warnings { get; set; } = new(); }