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

namespace FMSAdmin.Entities {
    public partial class CmInvestigation1 {
        public CmInvestigation1() {
            CmInvestigation1History = new HashSet<CmInvestigation1History>();
        }

        [Display(Name = "고유번호"), Key]
        public int SiteId { get; set; }
        public int InvestigationId { get; set; }
        [Display(Name = "정보조사번호"), Required]
        [StringLength(20)]
        public string InvestigationNo { get; set; }
        [Display(Name = "정보조사타입"), Required]
        public int InvestigationGroupId { get; set; }
        [Display(Name = "정보조사분류"), Required]
        public int InvestigationTypeId { get; set; }
        [Display(Name = "정보조사이름"), Required]
        [StringLength(200)]
        public string Name { get; set; }
        [Display(Name = "정보조사설명")]
        [StringLength(2000)]
        public string Description { get; set; }
        [Display(Name = "본사등록여부")]
        public bool IsAllSite { get; set; }
        [Display(Name = "정보조사파일")]
        [NotMapped]
        public CmFile CmFile { get; set; }
        [NotMapped]
        public String CreateUserId { get; set; }

        [ForeignKey("InvestigationGroupId")]
        public virtual CmInvestigation1CodeGroup CmInvestigation1CodeGroup { get; set; }
        [ForeignKey("InvestigationTypeId")]
        public virtual CmInvestigation1CodeType CmInvestigation1CodeType { get; set; }
        [ForeignKey("SiteId")]
        public virtual CmSite CmSite { get; set; }

        [InverseProperty("CmInvestigation1")]
        public virtual ICollection<CmInvestigation1History> CmInvestigation1History { get; set; }
    }
}
