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

namespace APT.MS.Domain.Entities.HM
{
    /// <summary>
    /// 风险记录明细表
    /// </summary>
    [Description("风险记录明细表")]
    public class T_HM_RISK_RECORD_DETAIL : MesEntityBase
    {
        /// <summary>
        /// 风险记录表ID
        /// </summary>
        [Description("风险记录表ID")]
        [DataFieldForeignKey("Nav_Record", "Nav_Details")]
        public Guid RECORD_ID { get; set; }

        /// <summary>
        /// 导航属性：风险记录表
        /// </summary>
        [Description("导航属性：风险记录表")]
        public T_HM_RISK_RECORD Nav_Record { get; set; }

        /// <summary>
        /// 危险源及风险库ID
        /// </summary>
        [Description("危险源及风险库")]
        [DataFieldForeignKey("Nav_EvaluateRisk")]
        public Guid? EVALUATE_RISK_ID { get; set; }

        /// <summary>
        /// 导航属性：危险源及风险库
        /// </summary>
        [Description("导航属性：危险源及风险库")]
        public T_HM_EVALUATE_RISK Nav_EvaluateRisk { get; set; }

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

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

        /// <summary>
        /// 状态 有效 = 0,作废 = 1,
        /// </summary>
        [Description("状态")]
        [EnumName("HMOperationStepEnum")]
        [FormFieldTable]
        [FormFieldEdit]
        public HMOperationStepEnum RISK_STATUS { get; set; }

        /// <summary>
        /// 辨识区域ID
        /// </summary>
        [Description("辨识区域")]
        [DataFieldForeignKey("Nav_Area")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? AREA_ID { get; set; }

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

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

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

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

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

        /// <summary>
        /// 导航属性：相关岗位
        /// </summary>
        [Description("相关岗位")]
        [FormFieldEdit]
        public ICollection<T_HM_RISK_RECORD_DETAIL_WORKDUTY> Nav_EvaluateRiskRecordWorkduty { get; set; }

        /// <summary>
        /// 导航属性：相关设备
        /// </summary>
        [Description("相关设备")]
        [FormFieldEdit]
        public ICollection<T_HM_RISK_RECORD_DETAIL_EQUIPMENT> Nav_EvaluateRiskRecordEquipment { 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("责任岗位")]
        [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("责任人")]
        [DataFieldForeignKey("Nav_LiableUser")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? LIABLE_USER_ID { get; set; }
        /// <summary>
        /// 导航属性：责任人
        /// </summary>
        [Description("导航属性：责任人")]
        public T_FM_USER Nav_LiableUser { get; set; }
        /// <summary>
        /// 导航属性：相关设施
        /// </summary>
        [Description("相关设施")]
        [FormFieldEdit]
        public ICollection<T_HM_RISK_RECORD_DETAIL_FACILITIES> Nav_EvaluateRiskRecordFacilities { get; set; } 
        /// <summary>
        /// 修改状态 数据库 = 0,修改=1,新增=2
        /// </summary>
        [Description("修改状态")]
        [EnumName("HMModifyEnum")]
        [FormFieldEdit]
        public HMModifyEnum MODIFY_TYPE { get; set; }
    }
}

