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_ORDINARY_TASK_DETAIL : MesEntityBase
    {
        [Description("一般任务分析表ID")]
        [DataFieldForeignKey("Nav_OrdinaryTaskAnalysis", "Nav_Details")]
        public Guid ORDINARY_TASK_ANALYSIS_ID { get; set; }

        [Description("导航属性：一般任务分析表")]
        public virtual T_HM_ORDINARY_TASK_ANALYSIS Nav_OrdinaryTaskAnalysis { 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; }


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


        /// <summary>
        /// 导航属性：风险库
        /// </summary>
        [Description("导航属性：风险库")]
        public ICollection<T_HM_ORDINARY_TASK_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; }
    }
}
