using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums.PF;
using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.BS;
using APT.MS.Domain.Entities.HM;
using APT.MS.Domain.Enums.SK;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace APT.MS.Domain.Entities.SK
{
    [Description("双重预防机制")]
    [DataRuleField("APPLY_DEPARTMENT_ID")]
    public class T_SK_DOUBLE_PREVENT_MECHANISM : MesEntityBase
    {

        [Description("隐患上报表")]
        public Guid? HIDDEN_DANGER_REPORT_ID { get; set; }

        [Description("隐患确认单")]
        public Guid? HIDDEN_DANGER_CONFIRM_ID { get; set; }

        [Description("风险评估汇总表")]
        public Guid? RISK_EVALUATE_SUMMARY_ID { get; set; }

        [Description("发起人")]
        [DataFieldForeignKey("Nav_ApplyUser")]
        public Guid? APPLY_USER_ID { get; set; }

        [Description("导航属性：发起人")]
        public virtual T_FM_USER Nav_ApplyUser { get; set; }

        [Description("发起部门")]
        [DataFieldForeignKey("Nav_ApplyDepartment")]
        public Guid? APPLY_DEPARTMENT_ID { get; set; }

        [Description("导航属性：发起部门")]
        public virtual T_FM_DEPARTMENT Nav_ApplyDepartment { get; set; }

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

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

        /// <summary>
        /// 检查内容
        /// </summary>
        [Description("检查内容")]
        [DataFieldForeignKey("Nav_Contents")]
        public Guid? CHECK_CONTENTS_ID { get; set; }

        /// <summary>
        /// 检查内容
        /// </summary>
        [Description("检查内容")]
        public virtual T_SK_CHECK_CONTENTS Nav_Contents { get; set; }

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

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

        /// <summary>
        /// 判定标准
        /// </summary>
        [Description("判定标准")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(500)]
        public string CHECKSTANDARD { get; set; }

        /// <summary>
        /// 隐患描述
        /// </summary>
        [Description("隐患描述")]
        [DataFieldForeignKey("Nav_Question")]
        public Guid? CHECK_QUESTION_ID { get; set; }

        /// <summary>
        /// 隐患描述
        /// </summary>
        [Description("隐患描述")]
        public virtual T_SK_CHECK_QUESTION Nav_Question { get; set; }
        /// <summary>
        /// 隐患描述
        /// </summary>
        [Description("隐患描述")]
        public string HIDDEN_DESCRIPTION { get; set; }
        /// <summary>
        /// 隐患等级
        /// </summary>
        [Description("隐患等级")]
        public SKHiddenLevel HIDDEN_LEVEL { get; set; }
        /// <summary>
        /// 隐患地点
        /// </summary>
        [Description("隐患地点")]
        public string HIDDEN_PLACE { get; set; }

        /// <summary>
        /// 整改措施
        /// </summary>
        [Description("整改措施")]
        public string RECTIFICATION_MEASURES { get; set; }
        /// <summary>
        /// 明细
        /// </summary>
        [Description("导航：明细")]
        public virtual ICollection<T_SK_DOUBLE_PREVENT_MECHANISM_DETAIL> Nav_DoubleDetails { get; set; }
        /// <summary>
        /// 附件
        /// </summary>
        [Description("导航：附件")]
        public virtual ICollection<T_SK_DOUBLE_PREVENT_MECHANISM_FILE> Nav_DoubleFiles { get; set; }

        [Description("状态")]
        [EnumName("PFStandardStatus")]
        public PFStandardStatus STATUS { get; set; }

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }

        [Description("驳回意见")]
        [DataFieldIngore]
        public string CONTEXT { get; set; }

        [Description("发起人部门")]
        [DataFieldLength(50)]
        public string ApplyDepartmentName { get; set; }
        [DataFieldLength(50)]
        [Description("发起人岗位")]
        public string ApplyPostName { get; set; }
    }
}
