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.BaseData.Domain.Enums;
using APT.MS.Domain.Enums;

namespace APT.MS.Domain.Entities.HM
{
    /// <summary>
    /// 危险源/风险辨识任务
    /// </summary>
    [Description("危险源/风险辨识任务")]
    public class T_HM_RISK_TASK : MesEntityBase
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Description("编码")]
        [DataFieldLength(50)]
        public string CODE { 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>
        /// 层级 3公司级 0部门级 1车间级 2班组级
        /// </summary>
        [Description("层级")]
        [EnumName("FMDepartmentType")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
		[DataFieldLength(50)]
        public string LEVEL { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        [EnumName("FOPreMeetingStatusEnum")]
        [FormFieldTable]
        [FormFieldQuery]
        public FOPreMeetingStatusEnum STATUS { get; set; }
        /// <summary>
        /// 发起部门ID
        /// </summary>
        [Description("发起部门ID")]
        [DataFieldForeignKey("Nav_InitiatingDepartment")]
        public Guid? INITIATING_DEPARTMENT { get; set; }
        /// <summary>
        /// 导航属性：发起部门
        /// </summary>
        [Description("导航属性：发起部门")]
        public T_FM_DEPARTMENT Nav_InitiatingDepartment { get; set; }
        /// <summary>
        /// 辨识要求ID
        /// </summary>
        [Description("辨识要求")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Request")]
        public Guid? REQUEST_ID { get; set; }
        /// <summary>
        /// 导航属性：辨识要求
        /// </summary>
        [Description("导航属性：辨识要求")]
        public T_HM_REQUEST Nav_Request { get; set; }
        /// <summary>
        /// 导航属性：辨识区域
        /// </summary>
        [Description("辨识区域")]
        [FormFieldEdit]
        public ICollection<T_HM_RISK_TASK_AREA> Nav_Areas { get; set; }
        /// 导航属性：辨识对象
        /// </summary>
        [Description("导航属性：辨识对象")]
        [FormFieldEdit]
        public ICollection<T_HM_RISK_TASK_IDENTIFYING> Nav_Identifyings { get; set; }
        /// <summary>
        /// 导航属性：附件
        /// </summary>
        [Description("导航属性：附件")]
        public ICollection<T_HM_RISK_TASK_FILE> Nav_Files { get; set; }
        /// <summary>
        /// 导航属性：辨识明细
        /// </summary>
        [Description("导航属性：辨识明细")]
        [FormFieldEdit]
        public ICollection<T_HM_RISK_TASK_DETAIL> Nav_Detail { 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; }
    }

}
