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_JOBTASK_IDENTIFY_DETAIL : MesEntityBase
    {
        [Description("作业任务识别表ID")]
        [DataFieldForeignKey("Nav_JobtaskIdentify", "Nav_Details")]
        public Guid JOBTASK_IDENTIFY_ID { get; set; }

        [Description("导航属性：作业任务识别表")]
        public virtual T_HM_JOBTASK_IDENTIFY Nav_JobtaskIdentify { 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("相关岗位表")]
        public ICollection<T_HM_JOBTASK_IDENTIFY_DETAIL_POST> Nav_DetailPost { get; set; }

        [Description("多个岗位逗号隔开")]
        [DataFieldIngore]
        public string DetailPost { get; set; }
        
        [Description("任务名称")]
        [DataFieldIngore]
        public string OperationStepName { 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; }

        /// <summary>
        /// 导航属性：风险库
        /// </summary>
        [Description("导航属性：风险库")]
        public ICollection<T_HM_JOBTASK_IDENTIFY_DETAIL_RISK> Nav_DetailRisk { get; set; }
        [Description("周期")]
        [EnumName("HMCycleTypeEnum")]
        [FormFieldEdit]
        public HMCycleTypeEnum CYCLE_TYPE { get; set; }
    }
}
