using APT.BaseData.Domain.Entities;
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.BS
{
    /// <summary>
    /// 延期整改申请
    /// </summary>
    [Description("延期整改申请")]
    [DataRuleField("APPLY_DEPARTMENT_ID")]
    public class T_BS_RISK_SUBMIT_DELAY_APPLY : MesEntityBase
    {
        /// <summary>
        /// 编码（用通知的）
        /// </summary>
        [Description("编码")]
        [DataFieldLength(30)]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public string CODE { get; set; }

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

        /// <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_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("整改通知")]
        [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("导航：延期整改明细")]
        [FormFieldEdit]
        public ICollection<T_BS_RISK_SUBMIT_DELAY_APPLY_DETAIL> Nav_ListApplyDetail { get; set; }

        /// <summary>
        /// 申请人
        /// </summary> 
        [Description("申请人")]
        [DataFieldForeignKey("Nav_User")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public Guid USER_ID { get; set; }

        /// <summary>
        /// 申请人
        /// </summary> 
        [Description("申请人")]
        public string USER_NAME { get; set; }


        /// <summary>
        /// 申请人
        /// </summary>
        [Description("导航:申请人")]
        public virtual T_FM_USER Nav_User { get; set; }


        /// <summary>
        /// 申请部门 冗余字段 人员变动 保存申请时所在部门
        /// </summary>
        [Description("申请部门")]
        [DataFieldForeignKey("Nav_DepartmentApply")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public Guid APPLY_DEPARTMENT_ID { get; set; }

        /// <summary>
        /// 申请部门
        /// </summary> 
        [Description("申请部门")]
        public string DEPARTMENT_NAME { get; set; }

        /// <summary>
        /// 申请部门
        /// </summary>
        [Description("导航:申请部门")]
        public virtual T_FM_DEPARTMENT Nav_DepartmentApply { get; set; }


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

        /// <summary>
        /// 问题等级  重大 = 10,A = 20,B = 30,C = 40,D = 50,
        /// T_BS_CHECK_MAIN 中 有 这边冗余
        /// </summary>
        [Description("问题等级")]
        [DataFieldIngore]
        public string QUESTION_LEVEL_SHOW { 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("操作类型")]
        [EnumName("OperateType")]
        public int OPERARTETYPE { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
    }
}