using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums;
using APT.BaseData.Domain.Enums.PF;
using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.PF;
using APT.MS.Domain.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace APT.MS.Domain.Entities.SE
{
    /// <summary>
    /// 年度培训计划详情
    /// </summary>
    [Description("年度培训计划详情")]
    public class T_SE_TRAIN_PLAN_DETAIL : MesEntityBase
    {
        /// <summary>
        /// 年度培训计划ID
        /// </summary>
        [Description("年度培训计划ID")]
        [DataFieldForeignKey("Nav_Plan", "Nav_ListPlanDetail")]
        public Guid PLAN_ID { get; set; }
        /// <summary>
        /// 导航: 年度培训计划
        /// </summary>
        [Description("导航: 年度培训计划")]
        public T_SE_TRAIN_PLAN Nav_Plan { get; set; }

        /// <summary>
        /// 年度培训计划明细 （公司为分解触发的明细 再此一对多细化 ）
        /// </summary>
        [Description("年度培训计划明细")]
        public Guid? PLAN_DETAIL_ID { get; set; }

        /// <summary>
        ///  培训月份 前端填写 给后台 DATE_TRAIN 赋值
        /// </summary>
        [Description("培训月份")]
        [DataFieldIngore]
        public int MONTH { get; set; }

        /// <summary>
        ///  培训时间 默认 1日0点
        /// </summary>
        [Description("培训时间")]
        [FormFieldEdit]
        public DateTime DATE_TRAIN { get; set; }

        /// <summary>
        /// 培训性质
        /// </summary>
        [Description("培训性质")]
        [FormFieldEdit]
        public TrainInOut IN_OUT { get; set; }

        /// <summary>
        /// 培训类型ID
        /// </summary>
        [Description("培训类型ID")]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_TrainTypeEnum")]
        public Guid? TYPE_ID { get; set; }

        /// <summary>
        /// 导航: 培训类型
        /// </summary>
        [Description("导航: 培训类型")]
        public T_SE_TRAIN_TYPE_ENUM Nav_TrainTypeEnum { get; set; }

        /// <summary>
        /// 培训名称
        /// </summary>
        [Description("培训名称")]
        [FormFieldEdit]
        [DataFieldLength(100)]
        public string NAME { get; set; }

        /// <summary>
        /// 培训对象
        /// </summary>
        [Description("培训对象")]
        [DataFieldLength(100)]
        [FormFieldEdit]
        public string OBJECT { get; set; }

        /// <summary>
        /// 培训形式     线上培训/线下培训  委外培训
        /// </summary>
        [Description("培训形式")]
        [FormFieldEdit]
        [EnumName("TrainType")]
        public TrainType TRAINTYPE { get; set; }

        /// <summary>
        /// 考核方式     线上培训/线下培训  委外培训
        /// </summary>
        [Description("考核方式")]
        [FormFieldEdit]
        [EnumName("PlanCheckType")]
        public PlanCheckType CHECKTYPE { get; set; }

        /// <summary>
        /// 培训学时
        /// </summary>
        [Description("培训学时")]
        [FormFieldEdit]
        public decimal CLASSHOUR { get; set; }

        /// <summary>
        /// 触发方式 直接培训 分解培训
        /// </summary>
        [Description("触发方式")]
        [FormFieldEdit]
        public SpringType SPRINTTYPE { get; set; }

        /// <summary>
        /// 全员参与（公司级才有可能是true）
        /// </summary>
        [Description("全员参与")]
        [FormFieldEdit]
        public bool ISALL { get; set; }

        /// <summary>
        /// 培训组织
        /// </summary>
        [Description("培训组织")]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }

        /// <summary>
        /// 导航: 责任部门
        /// </summary>
        [Description("培训组织")]
        public T_FM_DEPARTMENT Nav_Department { get; set; }

        /// <summary>
        /// 被培训组织 多个，就按多个触发培训通知
        /// </summary>
        [Description("被培训组织")]
        public ICollection<T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT> Nav_ListDetailDepartment { get; set; }

        /// <summary>
        /// 是否需要直接跑批
        /// 审批成功月份小于等于前时间为true 跑完为false
        /// </summary>
        [Description("被培训组织")]
        public bool ISNEEDINI { get; set; } = false;

        /// <summary>
        /// 状态
        /// 触发：默认0  单审批完成 10 触发了_20  审阅中_21_部分完成了   所有单子归档了_30
        /// 分解：部分完成分解了_21  分解完成就_30
        /// </summary>
        [Description("状态")]
        [EnumName("PFStandardStatus")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public PFStandardStatus STATUS { get; set; }

        /// <summary>
        /// 培训角色
        /// 与 培训组织 匹配 
        /// </summary>
        [Description("培训角色")]
        [DataFieldForeignKey("Nav_ApproveRole")]
        public Guid? APPROVAL_ROLE_ID { get; set; }

        /// <summary>
        /// 审批角色
        /// </summary>
        [Description("培训角色")]
        public T_PF_APPROVAL_ROLE Nav_ApproveRole { get; set; }
    }
}