using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace GPW.CORE.Data.DbModels { // // This is here so CodeMaid doesn't reorganize this document // public partial class CalcOreFasiModel { [Key] public int IdxFase { get; set; } public int IdxProgetto { get; set; } public string CodFase { get; set; } = ""; public int IdxFaseAncest { get; set; } public string NomeFase { get; set; } = ""; public string DescrizioneFase { get; set; } = ""; public bool? EnableTime { get; set; } public bool? EnableMoney { get; set; } public bool? Attivo { get; set; } public decimal budgetTime { get; set; } = 0; public decimal budgetMoney { get; set; } = 0; public double percOpen { get; set; } = 1; public string CodClasse { get; set; } = ""; public string CodExt { get; set; } = ""; public decimal totOre { get; set; } = 0; [NotMapped] public decimal percUsed { get { decimal answ = 0; decimal denom = budgetTime > 0 ? budgetTime : 1; answ = totOre / denom; return answ; } } [NotMapped] public decimal timeRem { get { return budgetTime - totOre; } } } }