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

namespace FMSAdmin.Entities {
    public partial class FmsReport {
        [Key]
        public int SiteId { get; set; }
        [Key]
        [Column("RId")]
        public int Rid { get; set; }
        [StringLength(128)]
        public string Title { get; set; }
        [StringLength(1024)]
        public string Contents { get; set; }
        [StringLength(24)]
        public string RegisterUserId { get; set; }
        public int? FileId { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime MakeDate { get; set; }
        [StringLength(24)]
        public string ConfirmUserId1 { get; set; }
        [StringLength(24)]
        public string ConfirmUserId2 { get; set; }
        public int BusinessFieldId { get; set; }

        [ForeignKey("BusinessFieldId")]
        [InverseProperty("FmsReport")]
        public virtual CmBusinessField CmBusinessField { get; set; }
        [ForeignKey("SiteId,FileId")]
        [InverseProperty("FmsReport")]
        public virtual CmFile CmFile { get; set; }
        [ForeignKey("ConfirmUserId1")]
        [InverseProperty("FmsReportCmUser")]
        public virtual CmUser CmUser { get; set; }
        [ForeignKey("RegisterUserId")]
        [InverseProperty("FmsReportCmUser1")]
        public virtual CmUser CmUser1 { get; set; }
        [ForeignKey("ConfirmUserId2")]
        [InverseProperty("FmsReportCmUserNavigation")]
        public virtual CmUser CmUserNavigation { get; set; }
        [ForeignKey(nameof(SiteId))]
        [InverseProperty(nameof(CmSite.FmsReport))]
        public virtual CmSite Site { get; set; }
    }
}
