Files
Extrudex/backend/Domain/Entities/MaterialBase.cs
cubecraft-agents[bot] 230c3b295d initial commit
2026-04-25 18:51:05 +00:00

36 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Extrudex.Domain.Base;
namespace Extrudex.Domain.Entities;
/// <summary>
/// Base polymer/material type. This is a lookup table enforcing consistent
/// material naming across all spools. Free-text material names are not allowed.
/// </summary>
public class MaterialBase : AuditableEntity
{
/// <summary>
/// Human-readable name of the base material (e.g., "PLA", "PETG", "ABS").
/// </summary>
public string Name { get; set; } = string.Empty;
/// <summary>
/// Density of the material in g/cm³ (g/mL). Used for deriving grams consumed
/// from mm extruded: grams = mm × cross_section_area × density.
/// </summary>
public decimal DensityGperCm3 { get; set; }
/// <summary>
/// Navigation collection of finishes available for this material base.
/// </summary>
public ICollection<MaterialFinish> Finishes { get; set; } = new List<MaterialFinish>();
/// <summary>
/// Navigation collection of modifiers applicable to this material base.
/// </summary>
public ICollection<MaterialModifier> Modifiers { get; set; } = new List<MaterialModifier>();
/// <summary>
/// Navigation collection of spools made from this material base.
/// </summary>
public ICollection<Spool> Spools { get; set; } = new List<Spool>();
}