using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using static CMS_CORE_Library.DataStructures; namespace Step.Model.DTOModels.ToolModels { public class DTOEdgeModel { [Required] public double ResidualLife { get; set; } [Required] public double NominalLife { get; set; } [Required] public double PreAlmLife { get; set; } [Required] public Dictionary EdgeAdditionalParams { get; set; } public static explicit operator EdgeModel(DTOEdgeModel obj) { return new EdgeModel() { Id = 0, NominalLife = obj.NominalLife, ResidualLife = obj.ResidualLife, PreAlmLife = obj.PreAlmLife, EdgeAdditionalParams = obj.EdgeAdditionalParams }; } } }