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

namespace APT.MS.Domain.Entities.HM
{
    /// <summary>
    /// 评价风险记录明细表
    /// </summary>
    [Description("危险源风险评价记录明细表")]
    public class T_HM_EVALUATE_RESULT_RISK : MesEntityBase
    {
        /// <summary>
        /// 风险记录表ID
        /// </summary>
        [Description("评价结果表")]
        [DataFieldForeignKey("Nav_EvaluateResult", "Nav_Risks")]

        public Guid EVALUATE_RESULT_ID { get; set; }

        /// <summary>
        /// 导航属性：评价结果表
        /// </summary>
        [Description("导航属性：评价结果表")]
        public T_HM_EVALUATE_RESULT Nav_EvaluateResult { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Description("风险名称")]
        [DataFieldLength(200)]
        [FormFieldEdit]
        public string NAME { get; set; }

        /// <summary>
        /// 风险地点
        /// </summary>
        [Description("风险地点")]
        [DataFieldLength(50)]
        [FormFieldEdit]
        public string RISK_PLACE { get; set; }

        /// <summary>
        /// 辨识区域
        /// </summary>
        [Description("辨识区域")]
        [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("辨识对象")]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Identifying")]
        public Guid? IDENTIFYING_ID { get; set; }

        /// <summary>
        /// 导航属性：辨识对象
        /// </summary>
        [Description("导航属性：辨识对象")]
        public T_HM_IDENTIFYING Nav_Identifying { get; set; }

        /// <summary>
        /// 风险类别
        /// </summary>
        [Description("风险类别")]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Type")]
        public Guid? TYPE_ID { get; set; }

        /// <summary>
        /// 导航属性：风险类别
        /// </summary>
        [Description("导航属性：风险类别")]
        public T_HM_RISK_TYPE Nav_Type { get; set; }

        /// <summary>
        /// 导航属性：相关岗位
        /// </summary>
        [Description("导航属性：相关岗位")]
        public List<T_HM_EVALUATE_RESULT_RISK_WORKDUTY> Nav_EvaluateRiskWorkduty { get; set; }

        /// <summary>
        /// 导航属性：相关设备
        /// </summary>
        [Description("导航属性：相关设备")]
        public List<T_HM_EVALUATE_RESULT_RISK_EQUIPMENT> Nav_EvaluateRiskEquipment { get; set; }

        /// <summary>
        /// 导航属性：相关设施
        /// </summary>
        [Description("导航属性：相关设施")]
        public List<T_HM_EVALUATE_RESULT_RISK_FACILITIES> Nav_EvaluateRiskFacilities { get; set; }

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

        /// <summary>
        /// 导航属性：作业环节
        /// </summary>
        [Description("导航属性：作业环节")]
        public T_HM_OPERATION_STEP Nav_OperationStep { get; set; }

        /// <summary>
        /// 风险评价LID
        /// </summary>
        [Description("风险评价L")]
        [FormFieldEdit]
        public decimal EVALUATE_L { get; set; }
        /// <summary>
        /// 风险评价EID
        /// </summary>
        [Description("风险评价E")]
        [FormFieldEdit]
        public decimal EVALUATE_E { get; set; }
        /// <summary>
        /// 风险评价CID
        /// </summary>
        [Description("风险评价C")]
        [FormFieldEdit]
        public decimal EVALUATE_C { get; set; }
        /// <summary>
        /// 分值D
        /// </summary>
        [Description("分值D")]
        [FormFieldEdit]
        public decimal EVALUATE_SCORE { get; set; }

        /// <summary>
        /// 风险等级
        /// </summary>
        [Description("风险等级")]
        [EnumName("EvaluateLevelEnum")]
        [FormFieldEdit]
        public EvaluateLevelEnum EVALUATE_LEVEL { get; set; }
        /// <summary>
        /// 导航属性：个体防护措施
        /// </summary>
        [Description("导航属性：个体防护措施")]
        public List<T_HM_EVALUATE_RESULT_RISK_INDIVIDUAL_MEASURES> Nav_EvaluateRiskIndividualMeasures { get; set; }

        /// <summary>
        /// 导航属性：工程控制措施
        /// </summary>
        [Description("导航属性：工程控制措施")]
        public List<T_HM_EVALUATE_RESULT_RISK_ENGINEERING_MEASURES> Nav_EvaluateRiskEngineeringMeasures { get; set; }

        /// <summary>
        /// 导航属性：管理控制措施
        /// </summary>
        [Description("导航属性：管理控制措施")]
        public List<T_HM_EVALUATE_RESULT_RISK_MANAGEMENT_MEASURES> Nav_EvaluateRiskManagementMeasures { get; set; }
        /// <summary>
        /// 导航属性：教育培训措施
        /// </summary>
        [Description("导航属性：教育培训措施")]
        public List<T_HM_EVALUATE_RESULT_RISK_EDUCATION_MEASURES> Nav_EvaluateRiskEducationMeasures { get; set; }

        /// <summary>
        /// 导航属性：应急处置措施
        /// </summary>
        [Description("导航属性：应急处置措施")]
        public List<T_HM_EVALUATE_RESULT_RISK_EMERGENCY_MEASURES> Nav_EvaluateRiskEmergencyMeasures { get; set; }

        
        /// <summary>
        /// 修改状态 数据库 = 0,修改=1,新增=2
        /// </summary>
        [Description("修改状态")]
        [EnumName("HMModifyEnum")]
        [FormFieldEdit]
        public HMModifyEnum MODIFY_TYPE { get; set; }
        /// <summary>
        /// 危险源及风险库ID
        /// </summary>
        [Description("危险源及风险库")]
        [DataFieldForeignKey("Nav_EvaluateRisk")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? EVALUATE_RISK_ID { get; set; }

        /// <summary>
        /// 导航属性：危险源及风险库
        /// </summary>
        [Description("导航属性：危险源及风险库")]
        public T_HM_EVALUATE_RISK Nav_EvaluateRisk { get; set; }
        /// <summary>
        /// 责任单位
        /// </summary>
        [Description("责任单位")]
        [DataFieldForeignKey("Nav_DepartmentLiable")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? DEPARTMENT_LIABLE_ID { get; set; }
        /// <summary>
        /// 导航属性：责任单位
        /// </summary>
        [Description("导航属性：责任单位")]
        public T_FM_DEPARTMENT Nav_DepartmentLiable { get; set; }
        /// <summary>
        /// 责任岗位
        /// </summary>
        [Description("责任岗位")]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_PostLiable")]
        public Guid? POST_LIABLE_ID { get; set; }

        /// <summary>
        /// 导航属性：责任岗位
        /// </summary>
        [Description("导航属性：责任岗位")]
        public T_PF_APPROVAL_ROLE Nav_PostLiable { get; set; }
        /// <summary>
        /// 任务责任人
        /// </summary>
        [Description("任务责任人")]
        [DataFieldForeignKey("Nav_LiableUser")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? LIABLE_USER_ID { get; set; }
        /// <summary>
        /// 导航属性：任务责任人
        /// </summary>
        [Description("任务责任人")]
        public T_FM_USER Nav_LiableUser { get; set; }
    }
}
