using APT.BaseData.Domain.Enums;
using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.BS;
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_SECURITY_INSPECTION_RECORD_DETAIL : MesEntityBase
    {
        /// <summary>
        /// 检查记录表
        /// </summary>
        [Description("检查记录表")]
        [DataFieldForeignKey("Nav_CheckRecord", "Nav_CheckRecordDetails")]
        public Guid SECURITY_INSPECTION_RECORD_ID { get; set; }

        /// <summary>
        /// 导航：检查记录表
        /// </summary>
        [Description("导航：检查记录表")]
        public virtual T_SK_SECURITY_INSPECTION_RECORD Nav_CheckRecord { 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("导航：检查明细人员")]
        public virtual ICollection<T_SK_SECURITY_INSPECTION_RECORD_DETAIL_USER> Nav_CheckRecordDetailUsers { get; set; }

        [Description("检查情况")]
        [EnumName("SKCheckResultEnum")]
        public SKCheckResultEnum? CHECK_RESULT { 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 virtual ICollection<T_SK_SECURITY_INSPECTION_RECORD_DETAIL_FILE> Nav_CheckRecordDetailFiles { get; set; }
        /// <summary>
        /// 标识
        /// </summary>
        [Description("标识")]
        public SKMarkEnum MARK { get; set; }

        [Description("导航：检查内容")]
        [DataFieldIngore]
        public virtual ICollection<T_SK_SECURITY_INSPECTION_RECORD_DETAIL> Nav_DetailContents { get; set; }

        /// <summary>
        /// 导航属性：检查依据
        /// </summary>
        [Description("导航：检查依据")]
        public virtual ICollection<T_SK_SECURITY_INSPECTION_RECORD_DETAIL_BASIC> Nav_CheckRecordDetailBasics { get; set; }

        /// <summary>
        /// 顺序
        /// </summary>
        [Description("顺序")]
        public int? NUM { get; set; }

        /// <summary>
        /// 隐患原因
        /// </summary>
        [Description("隐患原因")]
        [DataFieldLength(200)]
        public string HIDDEN_REASON { get; set; }

        /// <summary>
        /// 导航属性：隐患原因
        /// </summary>
        [Description("导航：隐患原因")]
        public virtual ICollection<T_SK_SECURITY_INSPECTION_RECORD_DETAIL_REASON> Nav_CheckRecordDetailReasons { get; set; }

        [Description("备注")]
        [DataFieldLength(200)]
        public string REMARK { get; set; }
    }
}
