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("Nav_Submit.DEPARTMENT_ID")]
    public class T_BS_RISK_SUBMIT_NOTICE_PERSON : MesEntityBase
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Description("编码")]
        [CUnique]
        [CodeRule((int)PFCodeRuleType.RiskSubmit)]
        [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_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("导航：隐患上报子表")]
        [FormFieldEdit]
        public virtual List<T_BS_RISK_SUBMIT_CONTENT> Nav_ListRiskSubmitContent { 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("通知责任人")]
        [DataFieldForeignKey("Nav_User")]
        public Guid USER_ID { get; set; }

        /// <summary>
        /// 导航：通知责任人 新版 =》 验收人
        /// </summary>
        [Description("导航：通知责任人")]
        public virtual T_FM_USER Nav_User { get; set; }

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

        /// <summary>
        /// 问题等级
        /// </summary>
        [Description("问题等级")]
        [DataFieldIngore]
        public string QUESTION_LEVEL_SHOW { get; set; }

        /// <summary>
        /// 操作状态
        /// </summary>
        [Description("操作状态")]
        [EnumName("OperateType")]
        [FormFieldEdit]
        public OperateType OPERATETYPE { get; set; } = OperateType.Temp;

        /// <summary>
        /// 操作状态
        /// </summary>
        [DataFieldIngore]
        public string OPERATETYPE_SHOW { get; set; }
    }
}