using APT.BaseData.Domain.Entities;
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.CM;
using APT.MS.Domain.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace APT.MS.Domain.Entities.CM
{
    /// <summary>
    /// 应急演练活动记录
    /// </summary>
    [Description("应急演练活动记录")]
    [DataRuleField("Nav_PlanDetail.DEPARTMENT_ID")]
    public class T_CM_DRILL_RECORD : MesEntityBase
    {
        /// <summary>
        /// 应急演练活动记录编号
        /// </summary>
        [Description("应急演练活动记录编号")]
        [CodeRule((int)PFCodeRuleType.应急管理)]
        [CUnique]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(50)]
        public string CODE { get; set; }

        /// <summary>
        /// 演练主题
        /// </summary>
        [Description("演练主题")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(200)]
        public string NAME { get; set; }

        /// <summary>
        /// 应急演练ID
        /// </summary>
        [Description("应急演练名称")]
        [DataFieldForeignKey("Nav_PlanDetail")]
        public Guid? PLAN_DETAIL_ID { get; set; }

        /// <summary>
        /// 应急演练名称
        /// </summary>
        [Description("应急演练名称")]
        [DataFieldForeignKey("Nav_Name")]
        public Guid? NAME_ID { get; set; }

        /// <summary>
        /// 应急演练名称
        /// </summary>
        [Description("应急演练名称")]
        public T_CM_DRILL_NAME Nav_Name { get; set; }

        /// <summary>
        /// 导航属性：导航属性：应急演练名称
        /// </summary>
        [Description("应急演练名称")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public virtual T_CM_DRILL_PLAN_DETAIL Nav_PlanDetail { get; set; }

        /// <summary>
        /// 演练时间
        /// </summary>
        [Description("演练时间")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(50)]
        public DateTime? TIME { get; set; }

        /// <summary>
        /// 演练地点
        /// </summary>
        [Description("演练地点")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(200)]
        public string PLACE { get; set; }

        /// <summary>
        /// 演练方式
        /// </summary>
        [Description("演练方式")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public CMDrillMethodEnum? METHOD { get; set; }

        /// <summary>
        /// 记录人ID
        /// </summary>
        [Description("记录人")]
        [DataFieldForeignKey("Nav_UserRecord")]
        public Guid? USER_ID_RECORD { get; set; }

        /// <summary>
        /// 导航：记录人
        /// </summary>
        [Description("记录人")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public virtual T_FM_USER Nav_UserRecord { get; set; }

        /// <summary>
        /// 现场总指挥ID
        /// </summary>
        [Description("现场总指挥")]
        [DataFieldForeignKey("Nav_UserManage")]
        public Guid? USER_ID_MANAGE { get; set; }

        /// <summary>
        /// 导航：现场总指挥
        /// </summary>
        [Description("现场总指挥")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public virtual T_FM_USER Nav_UserManage { get; set; }

        /// <summary>
        /// 导航：评估人员
        /// </summary>
        [Description("导航：评估人员")]
        public virtual ICollection<T_CM_DRILL_RECORD_USER_ESTIMATE> Nav_ListUserEstimate { get; set; }

        /// <summary>
        /// 演练内容
        /// </summary>
        [Description("演练内容")]
        [FormFieldEdit]
        [DataFieldLength(1000)]
        public string CONTENT { get; set; }

        /// <summary>
        /// 导航属性：内部演练单位
        /// </summary>
        [Description("导航属性：内部演练单位")]
        public virtual ICollection<T_CM_DRILL_RECORD_DEPARTMENT> Nav_ListDepartment { get; set; }

        /// <summary>
        /// 外部演练单位
        /// </summary>
        [Description("外部演练单位")]
        [FormFieldEdit]
        [DataFieldLength(800)]
        public string DEPARTMENT_OUT { get; set; }

        /// <summary>
        /// 导航属性：演练总结要求
        /// </summary>
        [Description("导航属性：演练总结要求")]
        public virtual ICollection<T_CM_DRILL_SUMMARY_REQUIREMENT> Nav_ListSummaryRequirement { get; set; }

        /// <summary>
        /// 导航属性：演练总结报告
        /// </summary>
        [Description("导航属性：演练总结报告")]
        public virtual ICollection<T_CM_DRILL_RECORD_SUMMARY_FILE> Nav_FilesSummary { get; set; }

        /// <summary>
        /// 导航属性：演练活动记录文件
        /// </summary>
        [Description("导航属性：演练活动记录文件")]
        public virtual ICollection<T_CM_DRILL_RECORD_FILE> Nav_FilesRecord { get; set; }

        /// <summary>
        /// 审批状态
        /// </summary>
        [Description("审批状态")]
        [FormFieldTable]
        [FormFieldQuery]
        public PFStandardStatus STATUS { get; set; }

        /// <summary>
        /// 审批流
        /// </summary>
        [Description("审批流")]
        [DataFieldForeignKey("Nav_Approve")]
        public Guid? APPROVE_ID { get; set; }

        /// <summary>
        /// 审批流
        /// </summary>
        [Description("会议发起审批流")]
        public T_PF_APPROVE Nav_Approve { get; set; }


        /// <summary>
        /// 生成方式
        /// </summary>
        [Description("生成方式")]
        public CREACTTYPEEnum CREACTTYPE { get; set; } = 0;


        /// <summary>
        /// 应急预案 SMS要 SPS 不要
        /// </summary>
        [Description("应急预案")]
        public virtual ICollection<T_CM_DRILL_RECORD_STANDER_FILE> Nav_FilesStander { get; set; }
    }
}