using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FMSAdmin.Entities {
    public partial class FmsAlarmPoint {
        public FmsAlarmPoint() {
            BemsMonitoringPointHistory15minList = new List<BemsMonitoringPointHistory15min>();
        }

        [Display(Name = "현장 고유번호"), Key]
        public int SiteId { get; set; }
        [Display(Name = "설비종류")]
        public int FacilityTypeId { get; set; }
        [Display(Name = "설비코드"), Key]
        public int FacilityCode { get; set; }
        [Display(Name = "설비속성고유번호"), Key]
        public int PropertyId { get; set; }

        [ForeignKey("SiteId")]
        public virtual CmSite Site { get; set; }

        [ForeignKey("SiteId,FacilityCode")]
        public virtual CmFacility Facility { get; set; }

        [ForeignKey("SiteId,FacilityCode,PropertyId")]
        public virtual BemsMonitoringPoint BemsMonitoringPoint { get; set; }

        [ForeignKey("FacilityTypeId")]
        public virtual BemsFacilityType FacilityType { get; set; }

        [InverseProperty(nameof(BemsMonitoringPointHistory15min.FmsAlarmPoint))]
        public virtual ICollection<BemsMonitoringPointHistory15min> BemsMonitoringPointHistory15minList { get; set; }
    }
}
