using GreenTree.Strohrmann.ERP.Core.Domain.Business; using GreenTree.Strohrmann.ERP.Web.Models.Shared; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace GreenTree.Strohrmann.ERP.Web.Models.Business { public class CraftMaterialModel { #region Properties /// /// Craft employee model index /// public int Index { get; set; } /// /// Craft id /// [Display(Name = "ID")] public int CraftId { get; set; } /// /// Craft /// [Display(Name = "Gewerk")] public virtual CraftModel Craft { get; set; } /// /// Material id /// [Display(Name = "Material ID")] public int MaterialId { get; set; } /// /// Material /// [Display(Name = "Material")] public MaterialModel Material { get; set; } /// /// The amount of the material /// [Display(Name = "Menge")] public decimal Amount { get; set; } /// /// The material calculation factor /// [Display(Name = "Kalkulationsfaktor")] public decimal CalculationFactor { get; set; } #endregion #region Ctor /// /// Initializes a new instance of the CraftMaterialModel class /// public CraftMaterialModel() { } /// /// Initializes a new instance of the CraftMaterialModel class /// /// The base craft material. public CraftMaterialModel(CraftMaterial craftMaterial) { if (craftMaterial == null) return; CraftId = craftMaterial.CraftId; MaterialId = craftMaterial.MaterialId; Amount = craftMaterial.Amount; CalculationFactor = craftMaterial.CalculationFactor; } #endregion } }