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

namespace APT.MS.Domain.Entities.CM
{
    /// <summary>
    /// 应急响应评估表
    /// </summary>
    [Description("应急响应评估表")]
    [DataRuleField("DEPARTMENT_ID_REPORT")]
    public class T_CM_RSP_ESTIMATE : MesEntityBase
    {
        /// <summary>
        /// 发起时间
        /// </summary>
        [Description("发起时间")]
        [FormFieldTable]
        [FormFieldEdit]
        public DateTime? LAUNCH_TIME { get; set; }

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

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

        /// <summary>
        /// 发起人员ID
        /// </summary>
        [Description("发起人")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_User")]
        public Guid? USER_ID { get; set; }

        /// <summary>
        /// 导航属性：发起部门
        /// </summary>
        [Description("导航属性：发起人员")]
        [FormFieldQuery]
        public virtual T_FM_USER Nav_User { get; set; }






        /// <summary>
        /// 事故/事件名称
        /// </summary>
        [Description("事故/事件名称")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(200)]
        public string EVENT_NAME { get; set; }

        /// <summary>
        /// 事故/事件  有就自动带别的数据 没有就手动输入
        /// </summary>
        [Description("事故/事件")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Event")]
        public Guid? EVENT_ID { get; set; }

        /// <summary>
        /// 导航属性：事故/事件
        /// </summary>
        [Description("导航属性：事故/事件")]
        [FormFieldQuery]
        [FormFieldEdit]
        public virtual T_AE_ACCIDENT_EVENT_REPORT Nav_Event { get; set; }

        /// <summary>
        /// 事故/事件时间
        /// </summary>
        [Description("事故/事件时间")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public DateTime? ACCIDENT_TIME { get; set; }

        /// <summary>
        /// 事故/事件地点
        /// </summary>
        [Description("事故/事件地点")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        [DataFieldLength(200)]
        public string ACCIDENT_PLACE { get; set; }

        /// <summary>
        /// 报告人员ID
        /// </summary>
        [Description("报告人员")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_UserReport")]
        public Guid? USER_ID_REPORT { get; set; }

        /// <summary>
        /// 导航属性：报告人员
        /// </summary>
        [Description("导航属性：报告人员")]
        [FormFieldQuery]
        public virtual T_FM_USER Nav_UserReport { get; set; }

        /// <summary>
        /// 报告人员部门ID
        /// </summary>
        [Description("事故/事件单位")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_DepartmentReport")]
        public Guid? DEPARTMENT_ID_REPORT { get; set; }

        /// <summary>
        /// 导航属性：报告人员部门
        /// </summary>
        [Description("导航属性：报告人员部门")]
        [FormFieldQuery]
        public virtual T_FM_DEPARTMENT Nav_DepartmentReport { get; set; }

        /// <summary>
        /// 导航属性： 事故/事件种类
        /// </summary>
        [Description("导航属性： 事故/事件种类")]
        public virtual ICollection<T_CM_RSP_ESTIMATE_EVENT_KIND> Nav_ListEventKind { get; set; }

        /// <summary>
        /// 事故类型ID
        /// </summary>
        [Description("事故类型")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_AccidentType")]
        public Guid? ACCIDENT_TYPE_ID { get; set; }

        /// <summary>
        /// 导航属性：事故类型
        /// </summary>
        [Description("事故类型")]
        [FormFieldQuery]
        public virtual T_AE_ACCIDENT_TYPE Nav_AccidentType { get; set; }

        /// <summary>
        /// 事故等级
        /// </summary>
        [Description("事故等级")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public AEAccidentLevel? ACCIDENT_LEVEL { get; set; }

        /// <summary>
        /// 事故/事件描述
        /// </summary>
        [Description("事故/事件描述")]
        [FormFieldEdit]
        [DataFieldLength(1000)]
        public string DESC { get; set; }











        /// <summary>
        /// 应急响应开始时间
        /// </summary>
        [Description("应急响应开始时间")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public DateTime? RSP_START_TIME { get; set; }


        /// <summary>
        /// 应急响应结束时间
        /// </summary>
        [Description("应急响应结束时间")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public DateTime? RSP_STOP_TIME { get; set; }


        /// <summary>
        /// 响应级别
        /// </summary>
        [Description("响应级别")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public AERspLevel? RSP_LEVEL { get; set; }


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

        /// <summary>
        /// 导航属性：指挥人员
        /// </summary>
        [Description("导航属性：指挥人员")]
        public virtual T_FM_USER Nav_UserManage { get; set; }


        /// <summary>
        /// 参与救援部门
        /// </summary>
        [Description("参与救援部门")]
        [FormFieldEdit]
        [DataFieldLength(400)]
        public string JoinDepartment { get; set; }

        /// <summary>
        /// 导航属性： 参与人员
        /// </summary>
        [Description("导航属性： 参与人员")]
        public virtual ICollection<T_CM_RSP_ESTIMATE_JOIN_USER> Nav_ListJoin { get; set; }

        /// <summary>
        /// 预案运行情况
        /// </summary>
        [Description("预案运行情况")]
        [FormFieldEdit]
        [DataFieldLength(1000)]
        public string RUN_SITUATION { get; set; }


        /// <summary>
        /// 现场恢复情况
        /// </summary>
        [Description("现场恢复情况")]
        [FormFieldEdit]
        [DataFieldLength(1000)]
        public string RESTORE_SITUATION { get; set; }

        /// <summary>
        /// 导航属性： 评估人员
        /// </summary>
        [Description("导航属性： 评估人员")]
        [FormFieldEdit]
        public virtual ICollection<T_CM_RSP_ESTIMATE_ESTIMATE_USER> Nav_ListEstimate { get; set; }

        /// <summary>
        /// 导航属性： 应急响应情况
        /// </summary>
        [Description("导航属性： 应急响应情况")]
        [FormFieldEdit]
        public virtual ICollection<T_CM_RSP_ESTIMATE_CONDITIONS> Nav_ListRspConditions { get; set; }


        /// <summary>
        /// <summary>
        /// 应急响应条件
        /// </summary>
        [Description("应急响应条件")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public CMRspCondition? RSP_CONDITION { get; set; }


        /// <summary>
        /// <summary>
        /// 响应程序
        /// </summary>
        [Description("响应程序")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public CMRspOrder? RSP_ORDER { get; set; }



        /// <summary>
        /// <summary>
        /// 培训水平
        /// </summary>
        [Description("培训水平")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public CMRspTrainingLevel? RSP_TRAINING_LEVEL { get; set; }

        /// <summary>
        /// <summary>
        /// 指挥系统
        /// </summary>
        [Description("指挥系统")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public CMRspCommandLevel? RSP_COMMAND_LEVEL { get; set; }


        /// <summary>
        /// 存在问题及改进建议
        /// </summary>
        [Description("存在问题及改进建议")]
        [FormFieldEdit]
        [DataFieldLength(1000)]
        public string ADVISE { get; set; }

        /// <summary>
        /// 评价结论
        /// </summary>
        [Description("评价结论")]
        [FormFieldEdit]
        [DataFieldLength(1000)]
        public string CONCLUSION { get; set; }

        /// <summary>
        /// 状态
        /// CMRspStatus 草稿 = 0,  签到中 = 1,  审批中 = 2, 审批拒绝 = 3, 审批通过 = 4
        /// </summary>
        [Description("状态")]
        public PFStandardStatus STATUS { get; set; }


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

        public T_PF_APPROVE Nav_Approve { get; set; }
    }
}
