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

namespace APT.MS.Domain.Entities.HM
{
    [Description("作业许可分析明细表")]
    public class T_HM_LICENSE_ANALYSIS_DETAIL : MesEntityBase
    {
        [Description("作业许可分析表ID")]
        [DataFieldForeignKey("Nav_LicenseAnalysis", "Nav_Details")]
        public Guid LICENSE_ANALYSIS_ID { get; set; }

        [Description("导航属性：作业许可分析表")]
        public virtual T_HM_LICENSE_ANALYSIS Nav_LicenseAnalysis { get; set; }

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

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

        [Description("作业前安全确认")]
        [DataFieldLength(500)]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string SafeConfirmsStr { get; set; }

        [Description("作业流程及安全措施")]
        [DataFieldLength(500)]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string SafeMeasuresStr { get; set; }

        [Description("作业后处理措施")]
        [DataFieldLength(500)]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string DealMeasuresStr { get; set; }

        /// <summary>
        /// 许可作业审批层级
        /// </summary>
        [EnumName("HMOperationTaskAuditEnum")]
        [Description("许可作业审批层级")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public HMOperationTaskAuditEnum AUDIT_LEVEL { get; set; }

        [Description("导航属性：附件表")]
        [FormFieldEdit]
        public ICollection<T_HM_LICENSE_ANALYSIS_FILE> Nav_Files { get; set; }

        [Description("作业许可类别")]
        [DataFieldForeignKey("Nav_WorkPermitType")]
        [FormFieldEdit]
        public Guid? WORK_PERMIT_TYPE_ID { get; set; }
        [Description("作业许可类别")]
        public virtual T_HM_WORK_PERMIT_TYPE Nav_WorkPermitType { get; set; }

        /// <summary>
        /// 导航属性：风险库
        /// </summary>
        [Description("导航属性：风险库")]
        public ICollection<T_HM_LICENSE_ANALYSIS_DETAIL_RISK> Nav_DetailRisk { get; set; }

        /// <summary>
        /// 辨识区域
        /// </summary>
        [Description("辨识区域")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Area")]

        public Guid? AREA_ID { get; set; }

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

        [Description("周期")]
        [EnumName("HMCycleTypeEnum")]
        [FormFieldEdit]
        public HMCycleTypeEnum CYCLE_TYPE { get; set; }
    }
}
