using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums;
using APT.BaseData.Domain.Enums.PF;
using APT.Infrastructure.Core;
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_SAFE_CHECK_TASK : MesEntityBase
    {
        /// <summary>
        /// 检查名称
        /// </summary>
        [Description("检查名称")]
        [DataFieldLength(100)]
        public string NAME { get; set; }

        /// <summary>
        /// 检查编号
        /// </summary>
        [Description("检查编号")]
        [DataFieldLength(50)]
        public string CODE { get; set; }

        /// <summary>
        /// 检查任务
        /// </summary>
        [Description("检查任务")]
        [DataFieldForeignKey("Nav_Task")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public Guid? TASK_ID { get; set; }
        /// <summary>
        /// 导航: 检查任务
        /// </summary>
        [Description("导航: 检查任务")]
        public T_WB_SAFE_CHECK Nav_Task { get; set; }
        /// <summary>
        /// 项目名称
        /// </summary>
        [Description("项目名称")]
        [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]
        public DateTime? CHECK_TIME { get; set; }
        /// <summary>
        /// 检查类型
        /// </summary>
        [Description("检查类型")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_CheckType")]
        public Guid CHECK_TYPE_ID { get; set; }
        /// <summary>
        /// 导航: 检查类型 T_WB_CHECK_TYPE_ENUM
        /// </summary>
        [Description("导航: 检查类型")]
        public T_WB_CHECK_TYPE Nav_CheckType { get; set; }
        /// <summary>
        /// 生产单元
        /// </summary>
        [Description("生产单元")]
        [FormFieldTable]
        [FormFieldEdit]
        [EnumName("FMProductionUnit")]
        public string MineType { get; set; }

        /// <summary>
        /// 生产单元
        /// </summary>
        [Description("生产单元")]
        [FormFieldTable]
        [FormFieldEdit]
        [DataFieldLength(200)]
        public string MineTypeShow { get; set; }

        /// <summary>
        /// 检查区域
        /// </summary>
        [Description("检查区域")]
        public ICollection<T_WB_SAFE_CHECK_TASK_AREA> Nav_ListArea { get; set; }

        /// <summary>
        /// 检查任务明细
        /// </summary>
        [Description("检查任务明细")]
        [FormFieldEdit]
        public ICollection<T_WB_SAFE_CHECK_TASK_DETAIL> Nav_Details { get; set; }

        /// <summary>
        /// 是否发送检查登记
        /// </summary>
        [Description("是否发送检查登记")]
        public bool ISSENDRECORD { get; set; } = false;

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        [FormFieldTable]
        [FormFieldQuery]
        [EnumName("PFStandardStatus")]
        public PFStandardStatus STATUS { get; set; }

        /// <summary>
        /// 生成方式
        /// </summary>
        [Description("生成方式")]
        public CREACTTYPEEnum CREACTTYPE { get; set; }

        /// <summary>
        /// 生成关联ID CHECK_TYPE_ENUM_ID
        /// </summary>
        [Description("生成关联ID")]
        public Guid? PLAN_SET_ID { get; set; }

        /// <summary>
        /// 是否取消
        /// </summary>
        [Description("是否取消")]
        public bool IS_CANCEL { get; set; } = false;

        /// <summary>
        /// 取消原因
        /// </summary>
        [Description("是否取消")]
        [DataFieldLength(200)]
        public string REMARK_CANCEL { get; set; }

        /// <summary>
        /// 取消人
        /// </summary>
        [Description("取消人")]
        public Guid? USER_ID_CANCEL { get; set; }


        /// <summary>
        /// 接收人
        /// </summary>
        [Description("接收人")]
        public Guid? USERID_DOPLAN { get; set; }

        /// <summary>
        /// 部门ID
        /// </summary>
        [Description("部门ID")]
        public Guid? DEPARTMENTID { get; set; }

        /// <summary>
        /// 限定时间
        /// </summary>
        [Description("限定时间")]
        public DateTime? LIMITDATETIME { 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; }
    }
}
