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

namespace APT.MS.Domain.Entities.SK
{
    [Description("辨识评估计划")]
    [DataRuleField("APPLY_DEPARTMENT_ID")]
    public class T_SK_IDENTIFY_EVALUATION_PLAN : MesEntityBase
    {
        [Description("发起人")]
        [DataFieldForeignKey("Nav_ApplyUser")]
        public Guid? APPLY_USER_ID { get; set; }

        [Description("导航属性：发起人")]
        public virtual T_FM_USER Nav_ApplyUser { get; set; }

        [Description("发起部门")]
        [DataFieldForeignKey("Nav_ApplyDepartment")]
        public Guid? APPLY_DEPARTMENT_ID { get; set; }

        [Description("导航属性：发起部门")]
        public virtual T_FM_DEPARTMENT Nav_ApplyDepartment { get; set; }

        [Description("年度")]
        public string YEAR { get; set; }

        [Description("辨识开始时间")]
        public DateTime? START_DATE { get; set; }
        [Description("辨识结束时间")]
        public DateTime? END_DATE { get; set; }

        [Description("评估结束时间")]
        public DateTime? EVALUATION_END_DATE { get; set; }

        [Description("评估内容")]
        public string CONTENTS { get; set; }

        /// <summary>
        /// 检查明细表
        /// </summary>
        [Description("导航：检查明细表")]
        public virtual ICollection<T_SK_IDENTIFY_EVALUATION_PLAN_DETAIL> Nav_Details { get; set; }
        /// <summary>
        /// 检查附件表
        /// </summary>
        [Description("导航：检查附件表")]
        public virtual ICollection<T_SK_IDENTIFY_EVALUATION_PLAN_FILE> Nav_Files { get; set; }

        [Description("状态")]
        [EnumName("PFStandardStatus")]
        public PFStandardStatus STATUS { get; set; }

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }

        /// <summary>
        /// 是否自动触发
        /// </summary>
        [Description("是否自动触发")]
        public bool ISAUTO { get; set; } = false;

        /// <summary>
        /// 是否已经触发
        /// </summary>
        [Description("是否已经触发")]
        public bool ISSEND { get; set; } = false;

        [Description("是否已经触发结果表")]
        public bool ISSEND_RESULT { get; set; } = false;

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

        [Description("发起人部门")]
        [DataFieldLength(50)]
        public string ApplyDepartmentName { get; set; }
        [DataFieldLength(50)]
        [Description("发起人岗位")]
        public string ApplyPostName { get; set; }

        [Description("导航：辨识要求表")]
        public virtual ICollection<T_SK_IDENTIFY_EVALUATION_PLAN_REQUIRE> Nav_Requires { get; set; }

        [Description("导航：评价要求表")]
        public virtual ICollection<T_SK_IDENTIFY_EVALUATION_PLAN_EVALUATION> Nav_Evaluations { get; set; }
    }
}
