using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums;
using APT.Infrastructure.Core;
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_NOTIFY : MesEntityBase
    {
        /// <summary>
        /// 发起时间
        /// </summary>
        [Description("发起时间")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public DateTime? LAUNCH_TIME { get; set; }
        /// <summary>
        /// 发起部门ID
        /// </summary>
        [Description("发起部门")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldForeignKey("Nav_LaunchDepartment")]
        public Guid? LAUNCH_DEPARTMENT_ID { get; set; }
        /// <summary>
        /// 导航: 发起部门
        /// </summary>
        [Description("导航: 发起部门")]
        public T_FM_DEPARTMENT Nav_LaunchDepartment { get; set; }
        /// <summary>
        /// 发起人员ID
        /// </summary>
        [Description("发起人员")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldForeignKey("Nav_LaunchUser")]
        public Guid? LAUNCH_USER_ID { get; set; }
        /// <summary>
        /// 导航: 发起人员
        /// </summary>
        [Description("导航: 发起人员")]
        public T_FM_USER Nav_LaunchUser { get; set; }
        /// <summary>
        /// 编号
        /// </summary>
        [Description("编号")]
        [CodeRule((int)PFCodeRuleType.安全教育培训通知)]
        [DataFieldLength(100)]
        public string CODE { get; set; }
        /// <summary>
        /// 培训名称
        /// </summary>
        [Description("培训名称")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public string NAME { get; set; }
        /// <summary>
        /// 培训类型
        /// </summary>
        [Description("培训类型")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldForeignKey("Nav_TrainType")]
        public Guid? TRAIN_TYPE { get; set; }
        /// <summary>
        /// 导航: 培训类型
        /// </summary>
        [Description("导航: 培训类型")]
        public T_SE_TRAIN_TYPE_ENUM Nav_TrainType { get; set; }
        /// <summary>
        /// 培训级别
        /// </summary>
        [Description("培训级别")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [EnumName("FMDepartmentType")]
        public FMDepartmentType LEVEL { get; set; }
        /// <summary>
        /// 培训时间
        /// </summary>
        [Description("培训开始时间")]
        [FormFieldTable]
        [FormFieldEdit]
        public DateTime? TRAIN_START_TIME { get; set; }
        /// <summary>
        /// 培训时间
        /// </summary>
        [Description("培训结束时间")]
        [FormFieldTable]
        [FormFieldEdit]
        public DateTime? TRAIN_END_TIME { get; set; }
        /// <summary>
        /// 培训地点
        /// </summary>
        [Description("培训地点")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public string TRAIN_ADDR { get; set; }
        /// <summary>
        /// 培训时长
        /// </summary>
        [Description("培训时长")]
        [FormFieldTable]
        [FormFieldEdit]
        public decimal HOURS { get; set; }
        /// <summary>
        /// 培训老师
        /// </summary>
        [Description("培训老师")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public string TRAIN_TEACHER { get; set; }
        /// <summary>
        /// 培训形式
        /// </summary>
        [Description("培训形式")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(50)]
        [EnumName("TRAINMODELENUM")]
        public string TRAIN_MODEL { get; set; }
        
        /// <summary>
        /// 考核方式ID
        /// </summary>
        [Description("考核方式")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_TrainCheckType")]
        public Guid? CHECK_TYPE_ID { get; set; }
        /// <summary>
        /// 导航: 考核方式
        /// </summary>
        [Description("导航: 考核方式")]
        public T_SE_TRAIN_CHECK_TYPE_ENUM Nav_TrainCheckType { get; set; }
        /// <summary>
        /// 导航: 培训内容
        /// </summary>
        [Description("导航: 培训内容")]
        public List<T_SE_TRAIN_NOTIFY_CONTENT_REL> Nav_TrainContentList { get; set; }
        /// <summary>
        /// 导航: 培训人员
        /// </summary>
        [Description("导航: 培训人员")]
        public List<T_SE_TRAIN_NOTIFY_PERSONS> Nav_TrainUserList { get; set; }
        /// <summary>
        /// 导航属性：附件
        /// </summary>
        [Description("导航属性：附件")]
        public ICollection<T_SE_TRAIN_NOTIFY_FILE> Nav_Files { get; set; }
        /// <summary>
        /// 培训安排及要求
        /// </summary>
        [Description("培训安排及要求")]
        [DataFieldLength(500)]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public string TRAIN_PLAN { get; set; }

        /// <summary>
        /// 是否需要培训效果评估
        /// </summary>
        [Description("是否需要培训效果评估")]
        [EnumName("SETrainNeedSuvey")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public SETrainNeedSuvey NEED_EVALUATION { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        [EnumName("SETrainNotifyStatus")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public SETrainNotifyStatus STATUS { get; set; }
        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        /// <summary>
        /// 是否触发培训记录
        /// </summary>
        [Description("是否触发培训记录")]
        [FormFieldTable]
        [FormFieldEdit]
        public bool CREATE_NOTIFY_RECORD { get; set; }

        /// <summary>
        /// 原始通知id
        /// </summary>
        [Description("原始通知id")]
        public Guid? ORIGINAL_NOTIFY_ID { get; set; }

        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
        /// <summary>
        /// 记录人
        /// </summary>
        [Description("记录人")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldForeignKey("Nav_RecordUser")]
        public Guid? RECORD_USER_ID { get; set; }
        /// <summary>
        /// 导航: 记录人
        /// </summary>
        [Description("导航: 记录人")]
        public T_FM_USER Nav_RecordUser { get; set; }
        /// <summary>
        /// 培训计划子表ID
        /// </summary>
        [Description("培训计划子表ID")]
        public Guid? TRAIN_PLAN_DETAIL_ID { get; set; }
    }
}
