using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.HM;
using APT.MS.Domain.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace APT.MS.Domain.Entities.HM
{
    /// <summary>
    /// 作业任务识别分析详情表(关联风险记录明细表)
    /// </summary>
    [Description("分析明细")]
    public class T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL : MesEntityBase
    {
        /// <summary>
        /// 作业任务识别分析表
        /// </summary>
        [Description("作业任务识别分析表")]
        [DataFieldForeignKey("Nav_DistinguishAnalyze", "Nav_AnalyzeDetails")]
        public Guid OPERATION_TASK_DISTINGUISH_ANALYZE_ID { get; set; }

        /// <summary>
        /// 导航：作业任务识别表
        /// </summary>
        [Description("导航：作业任务分析表")]
        public virtual T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE Nav_DistinguishAnalyze { get; set; }

        /// <summary>
        /// 作业环节
        /// </summary>
        [Description("作业环节")]
        [DataFieldForeignKey("Nav_OperationStep")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public Guid? OPERATION_STEP_ID { get; set; }

        /// <summary>
        /// 导航属性：作业环节
        /// </summary>
        [Description("导航属性：作业环节")]
        public virtual T_HM_OPERATION_STEP Nav_OperationStep { get; set; }
        /// <summary>
        /// 评分——伤害
        /// </summary> 
        [Description("伤害")]
        [DataFieldForeignKey("Nav_DistinguishAnalyzeH")]
        [FormFieldEdit]
        public Guid? ANALYZE_H_ID { get; set; }
        /// <summary>
        /// 导航：评分规则伤害
        /// </summary>
        [Description("伤害")]
        public virtual T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_H Nav_DistinguishAnalyzeH { get; set; }

        /// <summary>
        /// 评分——损失
        /// </summary> 
        [Description("损失")]
        [DataFieldForeignKey("Nav_DistinguishAnalyzeL")]
        [FormFieldEdit]
        public Guid? ANALYZE_L_ID { get; set; }
        /// <summary>
        /// 导航：评分规则损失
        /// </summary>
        [Description("损失")]
        public virtual T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_L Nav_DistinguishAnalyzeL { get; set; }

        /// <summary>
        /// 评分——环境污染
        /// </summary> 
        [Description("环境污染")]
        [DataFieldForeignKey("Nav_DistinguishAnalyzeE")]
        [FormFieldEdit]
        public Guid? ANALYZE_E_ID { get; set; }
        /// <summary>
        /// 导航：评分规则环境污染
        /// </summary>
        [Description("环境污染")]
        public virtual T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_E Nav_DistinguishAnalyzeE { get; set; }

        /// <summary>
        /// 评分——概率
        /// </summary> 
        [Description("概率")]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_DistinguishAnalyzeP")]
        public Guid? ANALYZE_P_ID { get; set; }
        /// <summary>
        /// 导航：评分规则概率
        /// </summary>
        [Description("导航：评分规则概率")]
        public virtual T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_P Nav_DistinguishAnalyzeP { get; set; }
        /// <summary>
        /// 评分——重复发生率
        /// </summary> 
        [Description("重复发生率")]
        [DataFieldForeignKey("Nav_DistinguishAnalyzeR")]
        [FormFieldEdit]
        public Guid? ANALYZE_R_ID { get; set; }
        /// <summary>
        /// 导航：评分规则重复发生率
        /// </summary>
        [Description("导航：评分规则重复发生率")]
        public virtual T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_R Nav_DistinguishAnalyzeR { get; set; }

        /// <summary>
        /// 总得分
        /// </summary>
        [Description("总得分")]
        [FormFieldEdit]
        public int SCORE { get; set; }

        /// <summary>
        /// 是否关键任务 否 = 0,是 = 1
        /// </summary>
        [Description("是否关键任务")]
        [EnumName("WFDisableStatusEnum")]
        [FormFieldEdit]
        public WFDisableStatusEnum IS_MAINTASK { get; set; }

        [Description("作业许可类别")]
        [DataFieldForeignKey("Nav_WorkPermitType")]
        [FormFieldEdit]
        public Guid? WORK_PERMIT_TYPE_ID { get; set; }
        [Description("作业许可类别")]
        public virtual T_HM_WORK_PERMIT_TYPE Nav_WorkPermitType { get; set; }

        /// <summary>
        /// 辨识区域
        /// </summary>
        [Description("辨识区域")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Area")]

        public Guid? AREA_ID { get; set; }

        /// <summary>
        /// 导航属性：辨识区域
        /// </summary>
        [Description("导航属性：辨识区域")]
        public T_HM_RISK_AREA Nav_Area { get; set; }

        /// <summary>
        /// 导航属性：风险库
        /// </summary>
        [Description("导航属性：风险库")]
        public ICollection<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_RISK> Nav_DetailRisk { get; set; }
        [Description("周期")]
        [EnumName("HMCycleTypeEnum")]
        [FormFieldEdit]
        public HMCycleTypeEnum CYCLE_TYPE { get; set; }
    }
}
