using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums;
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_RISK : MesEntityBase
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Description("编号")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public int CODE { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Description("风险名称")]
        [DataFieldLength(500)]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string NAME { 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("作业环节")]
        [DataFieldForeignKey("Nav_OperationStep")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public Guid? OPERATION_STEP_ID { get; set; }

        /// <summary>
        /// 导航属性：作业环节
        /// </summary>
        [Description("导航属性：作业环节")]
        public T_HM_OPERATION_STEP Nav_OperationStep { get; set; }
        /// <summary>
        /// 辨识对象
        /// </summary>
        [Description("辨识对象")]
        [DataFieldForeignKey("Nav_Identifying")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public Guid? IDENTIFYING_ID { get; set; }

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

        /// <summary>
        /// 风险类别
        /// </summary>
        [Description("风险类别")]
        [DataFieldForeignKey("Nav_Type")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]

        public Guid? TYPE_ID { get; set; }

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

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

        /// <summary>
        /// 风险评价L
        /// </summary>
        [Description("风险评价L")]
        [FormFieldEdit]
        public decimal EVALUATE_L { get; set; }

        /// <summary>
        /// 风险评价E
        /// </summary>
        [Description("风险评价E")]
        [FormFieldEdit]
        public decimal EVALUATE_E { get; set; }

        /// <summary>
        /// 风险评价C
        /// </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")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public EvaluateLevelEnum EVALUATE_LEVEL { get; set; }

        /// <summary>
        /// 风险等级
        /// </summary>
        [Description("风险等级")]
        [DataFieldIngore]
        public string EVALUATE_LEVEL_SHOW { get; set; }

        /// <summary>
        /// 个体防护措施
        /// </summary>
        [Description("个体防护措施")]
        [DataFieldLength(500)]
        public string IndividualMeasuresStr { get; set; }

        /// <summary>
        /// 工程控制措施
        /// </summary>
        [Description("工程控制措施")]
        [DataFieldLength(500)]
        public string EngineeringMeasuresStr { get; set; }

        /// <summary>
        /// 管理控制措施
        /// </summary>
        [Description("管理控制措施")]
        [DataFieldLength(500)]
        public string ManagementMeasuresStr { get; set; }
        /// <summary>
        /// 教育培训措施
        /// </summary>
        [Description("教育培训措施")]
        [DataFieldLength(500)]
        public string EducationTrainingMeasuresStr { get; set; }
        /// <summary>
        /// 应急处置措施
        /// </summary>
        [Description("应急处置措施")]
        [DataFieldLength(500)]
        public string EmergencyDisposalMeasuresStr { get; set; }
        /// <summary>
        /// 岗位
        /// </summary>
        [Description("岗位")]
        [DataFieldLength(500)]
        public string postStr { get; set; }
        /// <summary>
        /// 设备
        /// </summary>
        [Description("设备")]
        [DataFieldLength(500)]
        public string equipmentStr { get; set; }

        /// <summary>
        /// 层级 3公司级 0部门级 1车间级 2班组级
        /// </summary>
        [Description("层级")]
        [EnumName("FMDepartmentType")]
        [FormFieldTable]
        [FormFieldEdit]
        public FMDepartmentType LEVEL { get; set; }

        /// <summary>
        /// 导航属性：相关岗位
        /// </summary>
        [Description("相关岗位")]
        [FormFieldEdit]
        public ICollection<T_HM_EVALUATE_RISK_WORKDUTY> Nav_EvaluateRiskWorkduty { get; set; }
        /// <summary>
        /// 导航属性：相关设备
        /// </summary>
        [Description("相关设备")]
        [FormFieldEdit]
        public ICollection<T_HM_EVALUATE_RISK_EQUIPMENT> Nav_EvaluateRiskEquipment { get; set; }

        /// <summary>
        /// 导航属性：相关设施
        /// </summary>
        [Description("相关设施")]
        [FormFieldEdit]
        public ICollection<T_HM_EVALUATE_RISK_FACILITIES> Nav_EvaluateRiskFacilities { get; set; }
        /// <summary>
        /// 导航属性：个体防护措施
        /// </summary>
        [Description("个体防护措施")]
        [FormFieldEdit]
        public ICollection<T_HM_EVALUATE_RISK_INDIVIDUAL_MEASURES> Nav_EvaluateRiskIndividualMeasures { get; set; }

        /// <summary>
        /// 导航属性：工程控制措施
        /// </summary>
        [Description("工程控制措施")]
        [FormFieldEdit]

        public ICollection<T_HM_EVALUATE_RISK_ENGINEERING_MEASURES> Nav_EvaluateRiskEngineeringMeasures { get; set; }

        /// <summary>
        /// 导航属性：管理控制措施
        /// </summary>
        [Description("管理控制措施")]
        [FormFieldEdit]

        public ICollection<T_HM_EVALUATE_RISK_MANAGEMENT_MEASURES> Nav_EvaluateRiskManagementMeasures { get; set; }

        /// <summary>
        /// 导航属性：教育培训措施
        /// </summary>
        [Description("教育培训措施")]
        [FormFieldEdit]

        public ICollection<T_HM_EVALUATE_RISK_EDUCATION_MEASURES> Nav_EvaluateRiskEducationMeasures { get; set; }

        /// <summary>
        /// 导航属性：应急处置措施
        /// </summary>
        [Description("应急处置措施")]
        [FormFieldEdit]

        public ICollection<T_HM_EVALUATE_RISK_EMERGENCY_MEASURES> Nav_EvaluateRiskEmergencyMeasures { get; set; }
        /// <summary>
        /// 导航属性：部门
        /// </summary>
        [Description("部门")]
        [FormFieldEdit]

        public ICollection<T_HM_EVALUATE_RISK_DEPARTMENT> Nav_EvaluateRiskDepartment { get; set; }
        /// <summary>
        /// 状态 有效 = 0,作废 = 1
        /// </summary>
        [Description("状态")]
        [EnumName("HMOperationStepEnum")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public int STATUS { get; set; }
        /// <summary>
        /// 修改状态 数据库=0,修改=1,新增=2
        /// </summary>
        [Description("修改状态")]
        [EnumName("HMModifyEnum")]
        [FormFieldEdit]
        public HMModifyEnum MODIFY_TYPE { 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>
        /// 责任人ID
        /// </summary>
        [Description("责任岗位")]
        [DataFieldForeignKey("Nav_PostLiable")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? POST_LIABLE_ID { get; set; }
        /// <summary>
        /// 导航属性：责任人
        /// </summary>
        [Description("导航属性：责任岗位")]
        public T_PF_APPROVAL_ROLE Nav_PostLiable { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        [Description("类型")]
        [EnumName("FMProductionUnit")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public int? MineType { get; set; }
        /// <summary>
        /// 所属部门
        /// </summary>
        [Description("所属部门")]
        [DataFieldForeignKey("Nav_SourceDepartment")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? SOURCE_DEPARTMENT_ID { get; set; }
        /// <summary>
        /// 导航属性：所属部门
        /// </summary>
        [Description("导航属性：所属部门")]
        public T_FM_DEPARTMENT Nav_SourceDepartment { get; set; }
    }
}