using APT.BaseData.Domain.Entities.FM;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using APT.Infrastructure.Core;
using APT.BaseData.Domain.Entities;
using APT.MS.Domain.Enums;
using APT.BaseData.Domain.Enums;

namespace APT.MS.Domain.Entities.HM
{
    /// <summary>
    /// 评价结果表
    /// </summary>
    [Description("评价结果表")]
    public class T_HM_EVALUATE_RESULT : MesEntityBase
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Description("编码")]
        [DataFieldLength(50)]
        [FormFieldTable]
        [FormFieldEdit]
        public string CODE { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        [EnumName("FOPreMeetingStatusEnum")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public FOPreMeetingStatusEnum STATUS { get; set; }
        /// <summary>
        /// 评价类型
        /// </summary>
        [Description("评价类型")]
        [EnumName("HMRiskTypeEnmu")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public HMRiskTypeEnmu EVALUATE_TYPE { 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>
        /// 评价要求ID
        /// </summary>
        [Description("评价要求")]
        [DataFieldForeignKey("Nav_Requirement")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? REQUIREMENT_ID { get; set; }
        /// <summary>
        /// 导航属性：评价要求
        /// </summary>
        [Description("导航属性：评价要求")]
        public T_HM_EVALUATE_REQUIREMENT Nav_Requirement { get; set; }
        /// <summary>
        /// 评价人员ID
        /// </summary>
        [Description("评价人员")]
        [DataFieldForeignKey("Nav_NoteTaker")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? NOTE_TAKER_ID { get; set; }
        /// <summary>
        /// 导航属性：评价人员
        /// </summary>
        [Description("导航属性：评价人员")]
        public T_FM_USER Nav_NoteTaker { get; set; }
        /// <summary>
        /// 导航属性：附件
        /// </summary>
        [Description("导航属性：附件")]
        public ICollection<T_HM_EVALUATE_RESULT_FILE> Nav_Files { get; set; }
        /// <summary>
        /// 导航属性：危险源、风险评价表
        /// </summary>
        [Description("导航属性：危险源、风险评价表")]
        [FormFieldEdit]
        public ICollection<T_HM_EVALUATE_RESULT_RISK> Nav_Risks { get; set; }
        /// <summary>
        /// 导航属性：职业危害评价表
        /// </summary>
        [Description("导航属性：职业危害评价表")]
        [FormFieldEdit]
        public ICollection<T_HM_EVALUATE_RESULT_HAZARD> Nav_Hazards { get; set; }
        /// <summary>
        /// 发起部门ID
        /// </summary>
        [Description("发起部门")]
        [DataFieldForeignKey("Nav_InitiatingDepartment")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? INITIATING_DEPARTMENT { get; set; }
        /// <summary>
        /// 导航属性：发起部门
        /// </summary>
        [Description("导航属性：发起部门")]
        public T_FM_DEPARTMENT Nav_InitiatingDepartment { get; set; }
        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }

        [Description("审批流编号")]
        [DataFieldLength(50)]
        public string APPROVECODE { get; set; }
        /// <summary>
        /// 层级 3公司级 0部门级 1车间级 2班组级
        /// </summary>
        [Description("层级")]
        [EnumName("FMDepartmentType")]
        [FormFieldTable]
        [FormFieldEdit]
        public FMDepartmentType LEVEL { get; set; }
        /// <summary>
        /// 关联ID
        /// </summary>
        [Description("关联ID")]
        [DataFieldForeignKey("Nav_Plan")]
        public Guid? PLAN_ID { get; set; }
        /// <summary>
        /// 导航属性：关联ID
        /// </summary>
        [Description("导航属性：关联ID")]
        [FormFieldEdit]
        public T_HM_EVALUATION_PLAN Nav_Plan { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
    }
}

