using APT.BaseData.Domain.Entities;
using APT.BaseData.Domain.Entities.FM;
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.BS
{
    /// <summary>
    /// 隐患上报详情待入库
    /// </summary>
    [Description("隐患上报详情待入库")]
    public class T_BS_RISK_SUBMIT_CONTENT_TEMP : MesEntityBase
    {
        /// <summary>
        /// 检查对象
        /// </summary>
        [Description("检查对象")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [EnumName("BSMineTypeEnum")]
        public int CHECKOBJECT { get; set; }

        /// <summary>
        /// 检查项目ID
        /// </summary>
        [Description("检查项目")]
        [DataFieldForeignKey("Nav_CheckProject")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public Guid? CHECK_PROJECT_ID { get; set; }

        /// <summary>
        /// 检查项目
        /// </summary>
        [Description("导航：检查项目")]
        public virtual T_BS_CHECK_PROJECT Nav_CheckProject { get; set; }

        /// <summary>
        /// 检查项目分类
        /// （外键生成说表无效）DataFieldForeignKey Nav_CheckProjectProjectCategory
        /// </summary>
        [Description("检查项目分类")]
        public Guid? CHECK_PROJECT_PROJECT_CATEGORY_ID { get; set; }

        /// <summary>
        /// 检查项目ID
        /// </summary>
        [Description("检查问题")]
        [DataFieldForeignKey("Nav_CheckQuestion")]
        [FormFieldEdit]
        [FormFieldQuery]
        public Guid? CHECK_QUESTION_ID { get; set; }

        /// <summary>
        /// 检查项目
        /// </summary>
        [Description("导航：检查问题")]
        public virtual T_BS_CHECK_QUESTION Nav_CheckQuestion { get; set; }

        /// <summary>
        /// 问题描述(检查结果 其他 备注  规范人可修改)
        /// </summary>
        [Description("检查问题描述")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(500)]
        public string DESCREPTION { get; set; }

        /// <summary>
        /// 整改建议与措施 (系统没匹配到 要手动输入)
        /// </summary>
        [Description("整改建议与措施")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(500)]
        public string DEMAND { get; set; }

        /// <summary>
        /// 检查内容
        /// </summary>
        [Description("检查内容")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(500)]
        [FormFieldQuery]
        public string CHECKCONTENT { get; set; }

        /// <summary>
        /// 检查依据
        /// </summary>
        [Description("检查依据")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(500)]
        [FormFieldQuery]
        public string CHECKPROOF { get; set; }

        /// <summary>
        /// 问题等级  重大 = 10,A = 20,B = 30,C = 40,D = 50,
        /// </summary>
        [Description("问题等级")]
        [EnumName("BSQuestionLevelEnum")]
        [FormFieldEdit]
        [FormFieldTable]
        [FormFieldQuery]
        public int QUESTION_LEVEL { get; set; }

        /// <summary>
        /// 是否重大隐患 否 = 0,是 = 1,
        /// </summary>
        [Description("是否重大隐患")]
        [EnumName("BSSeriousRiskEnum")]
        [FormFieldEdit]
        [FormFieldTable]
        public int SERIOUS_RISK { get; set; }

        /// <summary>
        /// 检查类型ID
        /// </summary>
        [Description("检查类型")]
        [DataFieldForeignKey("Nav_CheckType")]
        [FormFieldEdit]
        [FormFieldTable]
        public Guid? CHECK_TYPE_ID { get; set; }

        /// <summary>
        /// 检查类型
        /// </summary>
        [Description("导航：检查类型")]
        public virtual T_BS_CHECK_TYPE Nav_CheckType { get; set; }

        /// <summary>
        /// 检查层级
        /// </summary>
        [Description("检查层级")]
        [DataFieldForeignKey("Nav_CheckTypeLevel")]
        [FormFieldEdit]
        [FormFieldQuery]
        public Guid? CHECK_TYPE_LEVEL_ID { get; set; }

        /// <summary>
        /// 检查层级
        /// </summary>
        [Description("导航：检查层级")]
        public virtual T_BS_CHECK_TYPE_LEVEL Nav_CheckTypeLevel { get; set; }

        /// <summary>
        /// 检查区域
        /// </summary>
        [Description("检查区域")]
        [DataFieldForeignKey("Nav_RiskArea")]
        [FormFieldEdit]
        [FormFieldTable]
        [FormFieldQuery]
        public Guid? RISK_AREA_ID { get; set; }

        /// <summary>
        /// 检查区域
        /// </summary>
        [Description("导航：检查区域")]
        public virtual T_HM_RISK_AREA Nav_RiskArea { get; set; }


        /// <summary>
        /// 安全检查 
        /// </summary>
        [Description("安全检查")]
        [DataFieldForeignKey("Nav_SafeCheck")]
        public Guid? SAFE_CHECK_ID { get; set; }

        /// <summary>
        /// 导航：安全检查
        /// </summary>
        [Description("导航：安全检查")]
        public virtual T_BS_SAFE_CHECK Nav_SafeCheck { get; set; }


        /// <summary>
        /// 检查明细
        /// </summary>
        [Description("检查明细")]
        [DataFieldForeignKey("Nav_SafeCheckDetail")]
        public Guid? SAFE_CHECK_DETAIL_ID { get; set; }

        /// <summary>
        /// 导航：检查明细
        /// </summary>
        [Description("导航：检查明细")]
        public virtual T_BS_SAFE_CHECK_DETAIL Nav_SafeCheckDetail { get; set; }




        /// <summary>
        /// 是否已入库
        /// </summary>
        [Description("是否已入库")]
        public bool ISINSERT { get; set; } = false;





        /// <summary>
        /// 隐患上报
        /// </summary>
        [Description("隐患上报")]
        [DataFieldForeignKey("Nav_Submit")]
        public Guid? RISK_SUBMIT_ID { get; set; }

        /// <summary>
        /// 导航：隐患上报
        ///// </summary>
        [Description("导航：隐患上报")]
        public virtual T_BS_RISK_SUBMIT Nav_Submit { get; set; }


        /// <summary>
        /// 隐患通知内容
        /// </summary>
        [Description("隐患通知内容")]
        [DataFieldForeignKey("Nav_SubmitContent")]
        public Guid? RISK_SUBMIT_CONTENT_ID { get; set; }

        /// <summary>
        /// 导航：隐患通知内容
        ///// </summary>
        [Description("导航：隐患通知内容")]
        public virtual T_BS_RISK_SUBMIT_CONTENT Nav_SubmitContent { get; set; }


        /// <summary>
        /// 编辑人
        /// </summary> 
        [Description("编辑人")]
        [DataFieldForeignKey("Nav_User")]
        [FormFieldEdit]
        public Guid? USER_ID_EDIT { get; set; }

        /// <summary>
        /// 编辑人
        /// </summary>
        [Description("导航:编辑人")]
        public virtual T_FM_USER Nav_User { get; set; }

        /// <summary>
        /// 审核人
        /// </summary> 
        [Description("审核人")]
        [DataFieldForeignKey("Nav_UserAudit")]
        [FormFieldEdit]
        public Guid? USER_ID_AUDIT { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        [Description("导航:审核人")]
        public virtual T_FM_USER Nav_UserAudit { get; set; }

        /// <summary>
        ///审批流
        /// </summary>
        [Description("审批流")]
        [DataFieldForeignKey("Nav_ApproveCheckAudit")]
        public Guid? APPROVE_ID { get; set; }

        /// <summary>
        /// 审批流
        /// </summary>
        [Description("审批流")]
        public T_PF_APPROVE Nav_ApproveCheckAudit { get; set; }

        /// <summary>
        /// 隐患入库状态
        /// </summary>
        [Description("隐患入库状态")]
        [EnumName("OrderType")]
        public OrderType ORDERTYPE { get; set; } = OrderType.Temp;
    }
}
