using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums;
using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.HM;
using APT.MS.Domain.Enums;
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("企业库")]
    public class T_SK_ENTERPRISE_LIBRARY : MesEntityBase
    {
        [Description("编码")]
        [DataFieldLength(50)]
        public string CODE { get; set; }
        /// <summary>
        /// 生产单元
        /// </summary>
        [Description("生产单元")]
        [EnumName("SKProductionUnit")]
        public SKProductionUnit MineType { get; set; }

        [Description("生产单元")]
        [DataFieldForeignKey("Nav_ProductionUnit")]
        public Guid? PRODUCTION_UNIT_ID { get; set; }
        [Description("导航属性：生产单元")]
        public T_FM_USER_PRODUCTION_UNIT_SET Nav_ProductionUnit { get; set; }
        /// <summary>
        /// 辨识区域
        /// </summary>
        [Description("辨识区域")]
        [DataFieldForeignKey("Nav_Area")]

        public Guid? AREA_ID { get; set; }

        /// <summary>
        /// 导航属性：辨识区域
        /// </summary>
        [Description("导航属性：辨识区域")]
        public T_SK_RISK_AREA Nav_Area { get; set; }
        /// <summary>
        /// 风险名称
        /// </summary>
        [Description("风险名称")]
        public string RISK_NAME { get; set; }
        /// <summary>
        /// 风险描述
        /// </summary>
        [Description("风险描述")]
        public string RISK_DESCRIPTION { get; set; }

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

        public Guid? TYPE_ID { get; set; }

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

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

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

        [Description("风险评价C")]
        [FormFieldEdit]
        public decimal EVALUATE_C { get; set; }

        [Description("分值D")]
        [FormFieldEdit]
        public decimal EVALUATE_SCORE { get; set; }

        /// <summary>
        /// 风险等级
        /// </summary>
        [Description("风险等级")]
        [EnumName("SKEvaluateLevelEnum")]
        public SKEvaluateLevelEnum EVALUATE_LEVEL { get; set; }

        /// <summary>
        /// 风险等级
        /// </summary>
        [Description("风险等级")]
        [DataFieldIngore]
        public string EVALUATE_LEVEL_SHOW { get; set; }
        /// <summary>
        /// 层级 3公司级 0部门级 1车间级 2班组级
        /// </summary>
        [Description("管控层级")]
        [EnumName("SKDepartmentTypeEnum")]
        [DataFieldLength(50)]
        public string DEPARTMENT_TYPE { get; set; }

        [Description("应急处置")]
        public string EMERGENCY { get; set; }

        [Description("风险名称")]
        [DataFieldForeignKey("Nav_RiskName")]

        public Guid? RISK_NAME_ID { get; set; }

        [Description("导航属性：风险名称")]
        public T_SK_RISK_NAME Nav_RiskName { get; set; }

        [Description("管控层级部门")]
        [FormFieldEdit]
        public ICollection<T_SK_ENTERPRISE_LIBRARY_DEPART> Nav_Departs { get; set; }

        [Description("辨识岗位")]
        [FormFieldEdit]
        public ICollection<T_SK_ENTERPRISE_LIBRARY_POST> Nav_Posts { get; set; }

        /// <summary>
        /// 是否有效
        /// </summary>
        [Description("是否有效")]
        [EnumName("FMEnableStatusEnum")]
        public FMEnableStatusEnum ENABLE_STATUS { get; set; }
        /// <summary>
        /// 导航属性：管控措施
        /// </summary>
        [Description("管控措施")]
        [FormFieldEdit]
        public ICollection<T_SK_ENTERPRISE_LIBRARY_DETAIL> Nav_Details { get; set; }
        [Description("顺序")]
        public int? NUM { get; set; }

        [Description("生产单元")]
        public string MINE_NAME { get; set; }
        [Description("辨识区域")]
        public string AREA_NAME { get; set; }
        [Description("风险类别")]

        public string TYPE_NAME { get; set; }

        [Description("是否同步基础库")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }

        [Description("管控措施")]
        [DataFieldIngore]
        public string MEASURE { get; set; }

        [Description("管控层级")]
        [DataFieldIngore]
        public string CONTROLLEVEL { get; set; }
        [Description("管控部门")]
        [DataFieldIngore]
        public string CONTROLDEPT { get; set; }
        [Description("管控责任人")]
        [DataFieldIngore]
        public string CONTROLUSER { get; set; }
        [Description("检查内容")]
        [DataFieldIngore]
        public string CHECKCONTENTS { get; set; }
        [Description("检查依据")]
        [DataFieldIngore]
        public string CHECKBASICS { get; set; }
        [Description("检查标准")]
        [DataFieldIngore]
        public string CHECKSTANDARDS { get; set; }
        [Description("检查层级")]
        [DataFieldIngore]
        public string CHECKLEVEL { get; set; }
        [Description("检查类型")]
        [DataFieldIngore]
        public string CHECKTYPE { get; set; }
        [Description("检查部门")]
        [DataFieldIngore]
        public string CHECKDEPT { get; set; }
        [Description("检查岗位")]
        [DataFieldIngore]
        public string CHECKPOST { get; set; }
        [Description("隐患描述")]
        [DataFieldIngore]
        public string HIDDENSCRIPTION { get; set; }
        [Description("隐患等级")]
        [DataFieldIngore]
        public string HIDDENLEVEL { get; set; }
        [Description("整改措施")]
        [DataFieldIngore]
        public string RECIFYMEASURE { get; set; }

        [Description("分值L")]
        [DataFieldForeignKey("Nav_SCOREL")]

        public Guid? SCOREL_ID { get; set; }

        [Description("导航属性：分值L")]
        public T_SK_SCOREL Nav_SCOREL { get; set; }

        [Description("分值E")]
        [DataFieldForeignKey("Nav_SCOREE")]

        public Guid? SCOREE_ID { get; set; }

        [Description("导航属性：分值E")]
        public T_SK_SCOREE Nav_SCOREE { get; set; }

        [Description("分值C")]
        [DataFieldForeignKey("Nav_SCOREC")]

        public Guid? SCOREC_ID { get; set; }

        [Description("导航属性：分值C")]
        public T_SK_SCOREC Nav_SCOREC { get; set; }
    }
}
