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

namespace FMSAdmin.Entities {
    public partial class CmBusinessField {
        public CmBusinessField() {
            CmAnnouncement = new HashSet<CmAnnouncement>();
            CmGuideline = new HashSet<CmGuideline>();
            CmUser = new HashSet<CmUser>();
            CmPartner = new HashSet<CmPartner>();
            FmsDailyReport = new HashSet<FmsDailyReport>();
            FmsMonthlyReport = new HashSet<FmsMonthlyReport>();
            FmsFacilityManual = new HashSet<FmsFacilityManual>();
            FmsLicense = new HashSet<FmsLicense>();
            FmsMaterial = new HashSet<FmsMaterial>();
            FmsMaterialCarriedForward = new HashSet<FmsMaterialCarriedForward>();
            FmsMaterialCodeLocation = new HashSet<FmsMaterialCodeLocation>();
            FmsMaterialPurchaseOrder = new HashSet<FmsMaterialPurchaseOrder>();
            FmsMaterialPurchaseRequest = new HashSet<FmsMaterialPurchaseRequest>();
            FmsMaterialRelease = new HashSet<FmsMaterialRelease>();
            FmsMaterialStored = new HashSet<FmsMaterialStored>();
            FmsMaterialWarehouse = new HashSet<FmsMaterialWarehouse>();
            FmsReport = new HashSet<FmsReport>();
            FmsWorkOrder = new HashSet<FmsWorkOrder>();
            FmsWorkRequest = new HashSet<FmsWorkRequest>();
            FmsWorkSchedule = new HashSet<FmsWorkSchedule>();

        }

        //업무 구분
        /*
        [Display(Name = "현장 고유번호"), Key]
        public int SiteId { get; set; }
        */
        [Display(Name = "업무분야 고유번호"), Key]
        public int BusinessFieldId { get; set; }
        [Display(Name = "업무분야 명칭"), Required]
        [StringLength(50)]
        public string Name { get; set; }
        [Display(Name = "사용 유무")]
        public bool? IsUse { get; set; }

        /*
        [ForeignKey(nameof(SiteId))]
        public virtual CmSite Site { get; set; }
        */


        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<BemsReportFormat> BemsReportFormat { get; set; }

        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<CmAnnouncement> CmAnnouncement { get; set; }



        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<CmGuideline> CmGuideline { get; set; }

        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<CmUser> CmUser { get; set; }

        [JsonIgnore]
        [InverseProperty("BusinessField")]
        public virtual ICollection<CmPartner> CmPartner { get; set; }

        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsDailyReport> FmsDailyReport { get; set; }

        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsMonthlyReport> FmsMonthlyReport { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsFacilityManual> FmsFacilityManual { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsLicense> FmsLicense { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsMaterial> FmsMaterial { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsMaterialCarriedForward> FmsMaterialCarriedForward { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsMaterialCodeLocation> FmsMaterialCodeLocation { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsMaterialPurchaseOrder> FmsMaterialPurchaseOrder { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsMaterialPurchaseRequest> FmsMaterialPurchaseRequest { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsMaterialRelease> FmsMaterialRelease { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsMaterialStored> FmsMaterialStored { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsMaterialWarehouse> FmsMaterialWarehouse { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsReport> FmsReport { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsWorkOrder> FmsWorkOrder { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsWorkRequest> FmsWorkRequest { get; set; }
        [JsonIgnore]
        [InverseProperty("CmBusinessField")]
        public virtual ICollection<FmsWorkSchedule> FmsWorkSchedule { get; set; }
    }
}
