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

namespace APT.MS.Domain.Entities.BS
{
    /// <summary>
    /// 隐患整改记录 隐患上报子表(关联检查内容)
    /// </summary>
    [Description("隐患整改记录")]
    public class T_BS_RISK_SUBMIT_CONTENT_DEAL : MesEntityBase
    {
        /// <summary>
        /// 隐患上报
        /// </summary>
        [Description("隐患上报")]
        [DataFieldForeignKey("Nav_Submit")]
        public Guid? RISK_SUBMIT_ID { get; set; }

        /// <summary>
        /// 导航：隐患上报
        ///// </summary>
        [Description("导航：隐患上报")]
        public virtual T_BS_RISK_SUBMIT Nav_Submit { get; set; }

        /// <summary>
        /// 隐患通知
        /// </summary>
        [Description("隐患通知")]
        [DataFieldForeignKey("Nav_SubmitNotice")]
        public Guid? RISK_SUBMIT_NOTICE_ID { get; set; }

        /// <summary>
        /// 导航：隐患通知
        ///// </summary>
        [Description("导航：隐患通知")]
        public virtual T_BS_RISK_SUBMIT_NOTICE Nav_SubmitNotice { get; set; }

        /// <summary>
        /// 隐患通知
        /// </summary>
        [Description("隐患通知")]
        [DataFieldForeignKey("Nav_SubmitNoticePerson")]
        public Guid? RISK_SUBMIT_NOTICE_PERSON_ID { get; set; }

        /// <summary>
        /// 导航：隐患通知
        ///// </summary>
        [Description("导航：隐患通知")]
        public virtual T_BS_RISK_SUBMIT_NOTICE_PERSON Nav_SubmitNoticePerson { get; set; }

        /// <summary>
        /// 隐患通知内容
        /// </summary>
        [Description("隐患通知内容")]
        [DataFieldForeignKey("Nav_SubmitContent")]
        public Guid? RISK_SUBMIT_CONTENT_ID { get; set; }

        /// <summary>
        /// 导航：隐患通知内容
        ///// </summary>
        [Description("导航：隐患通知内容")]
        public virtual T_BS_RISK_SUBMIT_CONTENT Nav_SubmitContent { get; set; }



        /// <summary>
        /// 编号
        /// </summary>
        [Description("编号")]
        [DataFieldLength(50)]
        [FormFieldQuery]
        [FormFieldTable]
        public string CODE { get; set; }

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

        /// <summary>
        /// 整改截止时间 （操作时间）
        /// </summary>
        [Description("整改截止时间")]
        [FormFieldEdit]
        [FormFieldQuery]
        [FormFieldTable]
        public DateTime? ENDDATE { get; set; }

        /// <summary>
        /// 导航：整改前附件
        /// </summary>
        [Description("导航：整改前附件")]
        public virtual ICollection<T_BS_RISK_SUBMIT_CONTENT_DEAL_FILE> Nav_Files { get; set; }


        /// <summary>
        /// 导航：整改后附件
        /// </summary>
        [Description("导航：整改后附件")]
        public virtual ICollection<T_BS_RISK_SUBMIT_CONTENT_DEAL_AFTER_FILE> Nav_FilesAfter { get; set; }

        /// <summary>
        /// 问题等级  重大 = 10,A = 20,B = 30,C = 40,D = 50,
        /// T_BS_CHECK_MAIN 中 有 这边冗余
        /// </summary>
        [Description("问题等级")]
        [EnumName("BSQuestionLevelEnum")]
        [FormFieldQuery]
        [FormFieldTable]
        public int QUESTION_LEVEL { get; set; }

        /// <summary>
        /// 完成情况  2草稿 10未完成  20延期中   30部分完成  40已完成 
        /// </summary>
        [Description("状态")]
        [EnumName("DealSituation")]
        [FormFieldQuery]
        [FormFieldTable]
        public int DEALSITUATION { get; set; }

        /// <summary>
        /// 完成情况  2草稿 10未完成  20延期中   30部分完成  40已完成 
        /// </summary>
        [DataFieldIngore]
        public string DEALSITUATION_SHOW { get; set; }
        /// <summary>
        /// 整改情况描述
        /// </summary>
        [Description("整改情况描述")]
        [DataFieldLength(500)]
        [FormFieldEdit]
        public string DEALDESCRIBE { get; set; }


        /// <summary>
        /// 整改责任人签名
        /// </summary>
        [Description("导航：整改责任人签名")]
        public virtual ICollection<T_BS_RISK_SUBMIT_CONTENT_DEAL_USERSIGN> Nav_ListUserSign { get; set; }

        /// <summary>
        /// 整改验收人签名
        /// </summary>
        [Description("导航：整改验收人签名")]
        public virtual ICollection<T_BS_RISK_SUBMIT_CONTENT_DEAL_USERCHECKSIGN> Nav_ListCheckUserSign { get; set; }

        /// <summary>
        /// 是否整改责任人签名
        /// </summary>
        [Description("是否整改责任人签名")]
        public bool ISDEALSIGN { get; set; } = false;

        /// <summary>
        /// 整改责任人验收意见
        /// </summary>
        [Description("整改责任人验收意见")]
        [DataFieldLength(500)]
        public string DEALOPINION { get; set; }

        /// <summary>
        /// 是否整改验收人签名
        /// </summary>
        [Description("是否整改验收人签名")]
        public bool ISCHECKSIGN { get; set; } = false;

        /// <summary>
        /// 整改落实人 签名时间（保存并发送时间）
        /// </summary>
        [Description("整改落实人签名时间")]
        public DateTime? DATETIME_ACTUAL_DEAL { get; set; }

        /// <summary>
        /// 整改责任人  签名时间
        /// </summary>
        [Description("责任人签名时间")]
        public DateTime? DATETIME_DEALSIGN { get; set; }

        /// <summary>
        /// 整改验收人 签名时间
        /// </summary>
        [Description("验收人签名时间")]
        public DateTime? DATETIME_CHECKSIGN { get; set; }


        /// <summary>
        /// 验收人验收意见
        /// </summary>
        [Description("验收人验收意见")]
        [DataFieldLength(500)]
        public string CHECKOPINION { get; set; }

        /// <summary>
        /// 整改责任人
        /// </summary> 
        [Description("整改责任人")]
        [DataFieldForeignKey("Nav_UserDeal")]
        [FormFieldEdit]
        public Guid? DEAL_USER_ID { get; set; }

        /// <summary>
        /// 整改责任人
        /// </summary>
        [Description("导航:整改责任人")]
        public virtual T_FM_USER Nav_UserDeal { get; set; }

        /// <summary>
        /// 整改落实人
        /// </summary> 
        [Description("整改落实人")]
        [DataFieldForeignKey("Nav_UserActualDeal")]
        [FormFieldEdit]
        public Guid? ACTUAL_DEAL_USER_ID { get; set; }

        /// <summary>
        /// 整改落实人
        /// </summary>
        [Description("导航:整改落实人")]
        public virtual T_FM_USER Nav_UserActualDeal { get; set; }

        /// <summary>
        /// 验收人
        /// </summary> 
        [Description("验收人")]
        [DataFieldForeignKey("Nav_UserCheck")]
        [FormFieldEdit]
        public Guid? CHECK_USER_ID { get; set; }

        /// <summary>
        /// 验收人
        /// </summary>
        [Description("导航:验收人")]
        public virtual T_FM_USER Nav_UserCheck { get; set; }


        /// <summary>
        /// 验收时间
        /// </summary>
        [Description("导航:验收时间")]
        [FormFieldQuery]
        [FormFieldTable]
        public DateTime? CHCECKTIME { get; set; }


        /// <summary>
        /// 检查审批流编号
        /// </summary>
        [Description("安全检查审批流")]
        [DataFieldForeignKey("Nav_ApproveCheckAudit")]
        public Guid? APPROVE_ID { get; set; }

        /// <summary>
        /// 安全检查审批流
        /// </summary>
        [Description("安全检查审批流")]
        public T_PF_APPROVE Nav_ApproveCheckAudit { get; set; }

        /// <summary>
        /// 审批流表单编码参数
        /// </summary>
        [Description("审批流表单编码参数")]
        [DataFieldIngore]
        public string FORM_CODE { get; set; }

        /// <summary>
        /// 操作类型（每个操作表都可以加）
        /// </summary>
        [Description("操作类型")]
        [EnumName("OperateType")]
        [DataFieldIngore]
        public int OPERARTETYPE { get; set; }

        /// <summary>
        /// 隐患整改明细 有延期 需要显示 
        /// </summary>
        [EnumName("延期申请信息")]
        [DataFieldIngore]
        public T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL Nav_ApplyDetail { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }

        [DataFieldIngore]
        public Guid? DEPARTMENT_ID { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Description("备注")]
        [FormFieldEdit]
        [DataFieldLength(100)]
        public string REMARK { get; set; }
    }
}