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
{
    [DataRuleField("DEPARTMENT_ID")]
    [Description("关键任务分析表")]
    public class T_HM_CRUCIAL_TASK_ANALYSIS : MesEntityBase
    {
        [Description("编号")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldQuery]
        public string CODE { get; set; }

        [Description("导航属性：关键任务人员分析表")]
        [FormFieldEdit]
        public ICollection<T_HM_CRUCIAL_ANALYSIS_PERSON> Nav_CrucialAnalysisPerson { get; set; }

        [Description("完成时间")]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime? COMPLETE_DATE { 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_CRUCIAL_TASK_DETAIL> Nav_Details { get; set; }

        /// <summary>
        /// 作业任务分析ID
        /// </summary>
        [Description("作业任务分析ID")]
        [DataFieldForeignKey("Nav_OperationAnalyze")]
        [FormFieldEdit]
        public Guid? OPERATION_ANALYZE_ID { get; set; }
        /// <summary>
        /// 导航：作业任务识别 
        /// </summary>
        [Description("作业任务分析ID")]
        public virtual T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE Nav_OperationAnalyze { get; set; }

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        [Description("表单状态")]
        [EnumName("FOPreMeetingStatusEnum")]
        public FOPreMeetingStatusEnum IS_PUBLISH { get; set; }
        [Description("回调接口")]
        [DataFieldIngore]
        public string CALLBACK_INTERFACE { get; set; }

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

        [Description("导航属性：审批")]
        [DataFieldIngore]
        public virtual ICollection<T_PF_APPROVE_DETAIL> Nav_ApproveDetails { get; set; }

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

        /// <summary>
        /// 许可作业审批层级
        /// </summary>
        [EnumName("HMOperationTaskAuditEnum")]
        [Description("许可作业审批层级")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public HMOperationTaskAuditEnum AUDIT_LEVEL { 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; }

        [Description("驳回意见")]
        [DataFieldIngore]
        public string CONTEXT { get; set; }
    }
}
