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

namespace FMSAdmin.Entities {
    public partial class FmsDailyReport {
        [Key]
        public int SiteId { get; set; }
        public int? DailyReportId { get; set; }
        [Required]
        [StringLength(128)]
        public string Name { get; set; }
        [StringLength(1024)]
        public string Contents { get; set; }
        [Required]
        [StringLength(24)]
        public string RegisterUserId { get; set; }
        [Key]
        [Column(TypeName = "date")]
        public DateTime AddDate { get; set; }
        [Key]
        public int BusinessFieldId { get; set; }
        [Column(TypeName = "text")]
        public string Datas { get; set; }
        [StringLength(24)]
        public string ApproverUserId { get; set; }
        [Column(TypeName = "date")]
        public DateTime? ApproveDate { get; set; }
        [Column(TypeName = "date")]
        public DateTime? RegisterDate { get; set; }
        [StringLength(24)]
        public string ApproverUserId2 { get; set; }
        [Column(TypeName = "date")]
        public DateTime? ApproveDate2 { get; set; }
        [StringLength(24)]
        public string ApproverUserId3 { get; set; }
        [Column(TypeName = "date")]
        public DateTime? ApproveDate3 { get; set; }
        [StringLength(24)]
        public string ApproverUserId4 { get; set; }
        [Column(TypeName = "date")]
        public DateTime? ApproveDate4 { get; set; }
        [StringLength(24)]
        public string ApproverUserId5 { get; set; }
        [Column(TypeName = "date")]
        public DateTime? ApproveDate5 { get; set; }
        [Display(Name = "첨부파일")]
        public int? FileId { get; set; }

        [ForeignKey("BusinessFieldId")]
        [InverseProperty("FmsDailyReport")]
        public virtual CmBusinessField CmBusinessField { get; set; }
        [ForeignKey("RegisterUserId")]
        [InverseProperty("FmsDailyReport")]
        public virtual CmUser CmUser { get; set; }

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