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

namespace FMSAdmin.Entities {
    public partial class FmsAlarmLog {
        public FmsAlarmLog() {
        }

        [Display(Name = "현장 고유번호"), Key]
        public int SiteId { get; set; }
        [Display(Name = "설비종류"), Key]
        public int FacilityTypeId { get; set; }
        [Display(Name = "설비코드")]
        public int FacilityCode { get; set; }
        [Display(Name = "설비속성고유번호"), Key]
        public int PropertyId { get; set; }
        [Display(Name = "등록일시"), Key]
        [Column(TypeName = "datetime")]
        public DateTime CreatedDateTime { get; set; }

        [Display(Name = "현재값")]
        public double CurrentValue { get; set; }

        [Display(Name = "푸시발송여부")]
        public bool IsSendPush { 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 FmsAlarmPoint AlarmPoint { get; set; }
    }
}
