using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Runtime.Serialization; using System.Web; using Weee.Models.Paramemter; namespace Weee.Models { #region WaterUsageSheet [Table("ProductLCAFabSurveyForm_WaterUsages")] public class WaterUsage : MonthlyData, SheetData { public int ID { get; set; } public string ReferenceFileLink { get; set; } public int Index { get; set; } public decimal Scalar { get; set; } public decimal KgCO2e { get; set; } public string Area { get; set; } public string Year { get; set; } public string ReferenceLink { get; set; } public string Description { get; set; } public int LCAID { get; set; } [ForeignKey("LCAID")] [JsonIgnore] [IgnoreDataMember] public virtual ProductLCA OwnerLCA { get; set; } [NotMapped] [JsonIgnore] [IgnoreDataMember] public int StartBase { get { if (OwnerLCA == null) return 0; return OwnerLCA.StartDate.Month; } } public int? ParameterID { get; set; } [ForeignKey("ParameterID")] [JsonIgnore] [IgnoreDataMember] public virtual YearlyParameter Parameter { get; set; } } #endregion }