using APT.BaseData.Domain.Entities;
using APT.BaseData.Domain.Entities.FM;
using APT.Infrastructure.Core;
using APT.MS.Domain.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace APT.MS.Domain.Entities.HM
{
    [Description("文件发布表")]
    public class T_HM_FILE_PUBLISH : MesEntityBase
    {
        [Description("文件名称")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldQuery]
        public string NAME { get; set; }

        [Description("文件编号")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldQuery]
        public string CODE { get; set; }

        [Description("关键任务分析表ID")]
        [DataFieldForeignKey("Nav_CrucialTaskAnalysis")]
        public Guid? CRUCIAL_TASK_ANALYSIS_ID { get; set; }

        [Description("导航属性：关键任务分析表")]
        [FormFieldEdit]
        public virtual T_HM_CRUCIAL_TASK_ANALYSIS Nav_CrucialTaskAnalysis { get; set; }

        [Description("作业许可分析表ID")]
        [DataFieldForeignKey("Nav_LicenseAnalysis")]
        public Guid? LICENSE_ANALYSIS_ID { get; set; }

        [Description("导航属性：作业许可分析表")]
        [FormFieldEdit]
        public virtual T_HM_LICENSE_ANALYSIS Nav_LicenseAnalysis { get; set; }

        [Description("一般任务分析表ID")]
        [DataFieldForeignKey("Nav_OrdinaryTaskAnalysis")]
        public Guid? ORDINARY_TASK_ANALYSIS_ID { get; set; }

        [Description("导航属性：一般任务分析表")]
        [FormFieldEdit]
        public virtual T_HM_ORDINARY_TASK_ANALYSIS Nav_OrdinaryTaskAnalysis { get; set; }

        [Description("发布时间")]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime? PUBLISH_DATE { get; set; }

        [Description("文件版次")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldQuery]
        public string EDITION { get; set; }

        [Description("发起部门ID")]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }

        [Description("导航属性：发起部门表")]
        public virtual T_FM_DEPARTMENT Nav_Department { get; set; }

        

        [Description("导航属性：发布范围表")]
        [FormFieldEdit]
        public ICollection<T_HM_FILE_PUBLISH_AREA> Nav_Area { get; set; }


        [Description("文件密级")]
        [EnumName("SecretLevelEnum")]
        public SecretLevelEnum SecretLevel { get; set; }

        [Description("导航属性：创建人")]
        public virtual T_FM_USER Nav_CreateUser { get; set; }

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        [Description("是否发布")]
        [EnumName("FOPreMeetingStatusEnum")]
        public FOPreMeetingStatusEnum IS_PUBLISH { get; set; }

        [Description("导航属性：许可")]
        [DataFieldIngore]
        public virtual ICollection<T_HM_LICENSE_ANALYSIS_DETAIL> Nav_License_Details { get; set; }
        [Description("导航属性：关键")]
        [DataFieldIngore]
        public virtual ICollection<T_HM_CRUCIAL_TASK_DETAIL> Nav_Crucial_Details { get; set; }
        [Description("导航属性：一般")]
        [DataFieldIngore]
        public virtual ICollection<T_HM_ORDINARY_TASK_DETAIL> Nav_Ordinary_Details { get; set; }

        [Description("是否自动生成")]
        [EnumName("ISImportantEnum")]
        public ISImportantEnum IS_AUTO { get; set; }

        /// <summary>
        /// 发起人
        /// </summary>
        [Description("发起人")]
        [DataFieldForeignKey("Nav_User")]
        [FormFieldEdit]
        public Guid? USER_ID { get; set; }
        /// <summary>
        /// 导航：发起人 
        /// </summary>
        [Description("发起人")]
        public virtual T_FM_USER Nav_User { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
    }
}
