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

namespace APT.MS.Domain.Entities.HM
{
    [DataRuleField("DEPARTMENT_ID")]
    /// <summary>
    /// 作业任务识别分析表
    /// </summary>
    [Description("作业任务识别分析表")]
    public class T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE : MesEntityBase
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Description("编码")]
        [DataFieldLength(50)]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string CODE { get; set; }

        /// <summary>
        /// 完成时间
        /// </summary>
        [Description("完成时间")]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime? COMPLETION_TIME { get; set; }

        /// <summary>
        /// 发起部门
        /// </summary>
        [Description("发起部门")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }

        /// <summary>
        /// 导航：识别部门
        /// </summary>
        [Description("导航：发起部门")]
        public virtual T_FM_DEPARTMENT Nav_Department { get; set; }

        /// <summary>
        /// 作业任务识别ID
        /// </summary>
        [Description("作业任务识别")]
        [DataFieldForeignKey("Nav_JobtaskIdentify")]
        [FormFieldEdit]
        public Guid? JOBTASK_IDENTIFY_ID { get; set; }
        /// <summary>
        /// 导航：作业任务识别 
        /// </summary>
        [Description("作业任务识别")]
        public virtual T_HM_JOBTASK_IDENTIFY Nav_JobtaskIdentify { get; set; }

        /// <summary>
        /// 导航：分析人员
        /// </summary>
        [Description("分析人员")]
        [FormFieldEdit]
        public virtual ICollection<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_USER> Nav_Users { get; set; }

        /// <summary>
        /// 导航：识别分析详情
        /// </summary>
        [Description("识别分析详情")]
        [FormFieldEdit]

        public virtual ICollection<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_DETAIL> Nav_AnalyzeDetails { get; set; }

        /// <summary>
        /// 导航：附件签名
        /// </summary>
        [Description("附件签名")]
        [FormFieldEdit]

        public virtual ICollection<T_HM_OPERATION_TASK_DISTINGUISH_ANALYZE_FILE> Nav_AnalyzeFiles { get; set; }

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        [Description("表单状态")]
        [EnumName("FOPreMeetingStatusEnum")]
        public FOPreMeetingStatusEnum IS_PUBLISH { get; set; }
        [Description("回调接口")]
        [DataFieldIngore]
        public string CALLBACK_INTERFACE { get; set; }

        [Description("导航属性：创建人")]
        public virtual T_FM_USER Nav_CreateUser { get; set; }

        [Description("导航属性：审批")]
        [DataFieldIngore]
        public virtual ICollection<T_PF_APPROVE_DETAIL> Nav_ApproveDetails { get; set; }

        [Description("是否自动生成")]
        [EnumName("ISImportantEnum")]
        public ISImportantEnum IS_AUTO { get; set; }

        /// <summary>
        /// 发起人
        /// </summary>
        [Description("发起人")]
        [DataFieldForeignKey("Nav_User")]
        [FormFieldEdit]
        public Guid? USER_ID { get; set; }
        /// <summary>
        /// 导航：发起人 
        /// </summary>
        [Description("发起人")]
        public virtual T_FM_USER Nav_User { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }

        [Description("驳回意见")]
        [DataFieldIngore]
        public string CONTEXT { get; set; }
    }
}
