
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;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace APT.MS.Domain.Entities.HM
{
    /// <summary>
    /// 职业危害记录表
    /// </summary>
    [Description("职业危害辨识记录")]
    public class T_HM_HAZARD_RECORD : MesEntityBase
    {

        /// <summary>
        /// 编码
        /// </summary>
        [Description("编码")]
        public string CODE { get; set; }
        /// <summary>
        /// 发起部门ID
        /// </summary>
        [Description("发起部门")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_InitiatingDepartment")]
        public Guid? INITIATING_DEPARTMENT { get; set; }
        /// <summary>
        /// 导航属性：发起部门
        /// </summary>
        [Description("导航属性：发起部门")]
        public T_FM_DEPARTMENT Nav_InitiatingDepartment { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        [Description("开始时间")]
        [FormFieldTable]
        [FormFieldEdit]
        public DateTime? START_TIME { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        [Description("结束时间")]
        [FormFieldTable]
        [FormFieldEdit]
        public DateTime? END_TIME { get; set; }
        /// <summary>
        /// 记录人ID
        /// </summary>
        [Description("记录人")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_NoteTaker")]
        public Guid? NOTE_TAKER_ID { get; set; }
        /// <summary>
        /// 导航属性：记录人
        /// </summary>
        [Description("导航属性：记录人")]
        public T_FM_USER Nav_NoteTaker { get; set; }
        /// <summary>
        /// 审批状态 0草稿 1记录 2签到中 3全部签到 4审核中 5归档
        /// </summary>
        [Description("状态")]
        [EnumName("FOPreMeetingStatusEnum")]
        public FOPreMeetingStatusEnum STATUS { get; set; }
        /// <summary>
        /// 层级
        /// </summary>
        [Description("层级")]
        [EnumName("FMDepartmentType")]
        [FormFieldTable]
        [FormFieldQuery]
        public FMDepartmentType LEVEL { get; set; }
        /// <summary>
        /// 导航属性：辨识人员
        /// </summary>
        [Description("辨识人员")]
        [FormFieldEdit]
        public List<T_HM_HAZARD_RECORD_USER> Nav_Users { get; set; }
        /// <summary>
        /// 导航属性：附件
        /// </summary>
        [Description("附件")]
        [FormFieldEdit]
        public List<T_HM_HAZARD_RECORD_FILE> Nav_Files { get; set; }
        /// <summary>
        /// 导航属性：明细
        /// </summary>
        [Description("明细")]
        [FormFieldEdit]
        public List<T_HM_HAZARD_RECORD_DETAIL> Nav_Details { get; set; }
        /// <summary>
        /// 职业危害任务表ID
        /// </summary>
        [Description("职业危害任务表")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? TASK_ID { get; set; }
        /// <summary>
        /// 导航属性：职业危害任务表
        /// </summary>
        [Description("导航属性：职业危害任务表")]
        public T_HM_HAZARD_TASK Nav_Task { get; set; }

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        [Description("审批流编号")]
        [DataFieldLength(50)]
        public string APPROVECODE { get; set; }
        /// <summary>
        /// 任务责任人
        /// </summary>
        [Description("任务责任人")]
        [DataFieldForeignKey("Nav_LiableUser")]
        [FormFieldTable]
        [FormFieldEdit]
        public Guid? LIABLE_USER_ID { get; set; }
        /// <summary>
        /// 导航属性：任务责任人
        /// </summary>
        [Description("任务责任人")]
        public T_FM_USER Nav_LiableUser { 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; }
        [Description("区域")]
        [DataFieldLength(500)]
        public string AREAS { get; set; }
        [Description("辨识对象")]
        [DataFieldLength(500)]
        public string IDENTIFYINGS { get; set; }

    }

}
