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.WB;
using APT.MS.Domain.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace APT.MS.Domain.Entities.WB
{
    /// <summary>
    /// 外包工程危险作业审批表
    /// </summary>
    [Description("外包工程危险作业审批表")]
    [DataRuleField("DEPARTMENT_ID")]
    public class T_WB_DANGEROUS_JOB : MesEntityBase
    {
        /// <summary>
        /// 项目ID
        /// </summary>
        [Description("项目ID")]
        [DataFieldForeignKey("Nav_Project")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public Guid PROJECT_ID { get; set; }
        /// <summary>
        /// 导航: 项目
        /// </summary>
        [Description("导航: 项目")]
        public T_WB_PROJECT_INPUT Nav_Project { get; set; }
        /// <summary>
        /// 作业类别
        /// </summary>
        [Description("作业类别")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Type")]
        public Guid TYPE_ID { get; set; }
        /// <summary>
        /// 导航: 作业类别
        /// </summary>
        [Description("导航: 作业类别")]
        public T_WB_JOB_TYPE_ENUM Nav_Type { get; set; }
        /// <summary>
        /// 危险作业名称
        /// </summary>
        [Description("危险作业名称")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldLength(200)]
        public string DANGEROUS_JOB_NAME { get; set; }
        /// <summary>
        /// 危险作业具体事项
        /// </summary>
        [Description("危险作业具体事项")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldLength(500)]
        public string DANGEROUS_JOB_ITEM { get; set; }
        /// <summary>
        /// 作业风险辨识
        /// </summary>
        [Description("作业风险辨识")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldLength(500)]
        public string JOB_RISK_IDENTIFY { get; set; }
        /// <summary>
        /// 作业开始时间
        /// </summary>
        [Description("作业开始时间")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public DateTime? START_TIME { get; set; }
        /// <summary>
        /// 作业结束时间
        /// </summary>
        [Description("作业结束时间")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public DateTime? END_TIME { get; set; }
        /// <summary>
        /// 作业地点
        /// </summary>
        [Description("作业地点")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldLength(100)]
        public string JOB_ADDRESS { get; set; }
        /// <summary>
        /// 导航: 作业人员
        /// </summary>
        [Description("作业人员")]
        public ICollection<T_WB_DANGEROUS_JOB_USER> Nav_Users { get; set; }
        /// <summary>
        /// 现场监护人
        /// </summary>
        [Description("现场监护人")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_User")]
        public Guid USER_ID { get; set; }
        /// <summary>
        /// 导航: 现场监护人
        /// </summary>
        [Description("导航: 现场监护人")]
        public T_FM_USER Nav_User { get; set; }
        /// <summary>
        /// 导航: 附件
        /// </summary>
        [Description("附件")]
        public ICollection<T_WB_DANGEROUS_JOB_FILE> Nav_Files { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        [FormFieldTable]
        [FormFieldQuery]
        [EnumName("PFStandardStatus")]
        public PFStandardStatus STATUS { get; set; }
        /// <summary>
        /// 导航: 作业子表
        /// </summary>
        [Description("作业子表")]
        [FormFieldEdit]
        public ICollection<T_WB_DANGEROUS_JOB_DETAIL> Nav_Detail { get; set; }
        /// <summary>
        /// 导航: 审批子表
        /// </summary>
        [Description("审批子表")]
        public ICollection<T_WB_DANGEROUS_JOB_AUDIT> Nav_Audit { get; set; }
        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }



        /// <summary>
        /// 是否交底
        /// </summary>
        [Description("是否交底")]
        public int DISCLOSE { get; set; }
        /// <summary>
        /// 交底时间
        /// </summary>
        [Description("交底时间")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public DateTime? DISCLOSE_TIME { get; set; }
        /// <summary>
        /// 交底人
        /// </summary>
        [Description("交底人")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_DisCloseUser")]
        public Guid? DISCLOSE_USER_ID { get; set; }
        /// <summary>
        /// 交底人签名
        /// </summary>
        [Description("交底人签名")]
        public int DEAL_STATUS { get; set; }
        /// <summary>
        /// 导航: 交底人
        /// </summary>
        [Description("导航: 交底人")]
        public T_FM_USER Nav_DisCloseUser { get; set; }
        /// <summary>
        /// 导航: 被交底人
        /// </summary>
        [Description("被交底人")]
        public ICollection<T_WB_DANGEROUS_JOB_DISCLOSE_USER> Nav_DisCloseUsers { get; set; }
        /// <summary>
        /// 导航: 交底附件
        /// </summary>
        [Description("交底附件")]
        public ICollection<T_WB_DANGEROUS_JOB_DISCLOSE_FILE> Nav_DisCloseFiles { get; set; }
        /// <summary>
        /// 导航: 交底明细
        /// </summary>
        [Description("交底明细")]
        public ICollection<T_WB_DANGEROUS_JOB_DISCLOSE_DETAIL> Nav_DisCloseDetails { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        [FormFieldTable]
        [FormFieldQuery]
        [EnumName("PFStandardStatus")]
        public PFStandardStatus DISCLOSE_STATUS { get; set; }

        /// <summary>
        /// 监察部门
        /// </summary>
        [Description("监察部门")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_MointerDepartment")]
        public Guid? MOINTER_DEPARTMENT_ID { get; set; }
        /// <summary>
        /// 导航: 监察部门
        /// </summary>
        [Description("导航: 监察部门")]
        public T_FM_DEPARTMENT Nav_MointerDepartment { get; set; }
        /// <summary>
        /// 监察人
        /// </summary>
        [Description("监察人")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_MointerUser")]
        public Guid? MOINTER_USER_ID { get; set; }
        /// <summary>
        /// 导航: 监察人
        /// </summary>
        [Description("导航: 监察人")]
        public T_FM_USER Nav_MointerUser { get; set; }

        /// <summary>
        /// 监察人确认
        /// </summary>
        [Description("监察人确认")]
        public int MOINTER_DEAL_STATUS { get; set; }
        /// <summary>
        /// 导航: 记录明细
        /// </summary>
        [Description("记录明细")]
        public ICollection<T_WB_DANGEROUS_JOB_RECORD_DETAIL> Nav_RecordDetails { get; set; }
        /// <summary>
        /// 记录状态 
        /// </summary>
        [Description("记录状态")]
        public PFStandardStatus? STATUS_DETAIL { get; set; }

        /// <summary>
        /// 导航: 监察记录
        /// </summary>
        [Description("监察记录")]
        public ICollection<T_WB_DANGEROUS_JOB_MOINTER_RECORD_DETAIL> Nav_MointerRecordDetails { get; set; }
        /// <summary>
        /// 监察状态
        /// </summary>
        [Description("监察状态")]
        public PFStandardStatus? STATUS_MOINTER { get; set; }

        /// <summary>
        /// 审批流
        /// </summary>
        [DataFieldIngore]
        public T_PF_APPROVE Nav_Approve { get; set; }

        /// <summary>
        /// 外包单位
        /// </summary>
        [Description("外包单位")]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }

        /// <summary>
        /// 外包单位
        /// </summary>
        [Description("外包单位")]
        public T_FM_DEPARTMENT Nav_Department { get; set; }
    }
}
