using APT.BaseData.Domain.Entities;
using APT.BaseData.Domain.Entities.FM;
using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.HM;
using APT.MS.Domain.Entities.OG;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace APT.MS.Domain.Entities.FO
{
    [Description("技术交底表")]
    [DataRuleField("DEPARTMENT_ID")]
    public class T_FO_TECH_DISCLOSURE_FROM : MesEntityBase
    {
        [Description("编号")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldQuery]
        public string CODE { get; set; }


        /// <summary>
        /// 作业名称
        /// </summary>
        [Description("作业名称")]
        [DataFieldForeignKey("Nav_OperationStep")]
        [FormFieldEdit]
        public Guid? OPERATION_STEP_ID { get; set; }

        /// <summary>
        /// 导航属性：作业名称
        /// </summary>
        [Description("导航属性：作业名称")]
        public T_HM_OPERATION_STEP Nav_OperationStep { get; set; }

        /// <summary>
        /// 关键许可工作票
        /// </summary>
        [Description("关键许可工作票")]
        [DataFieldForeignKey("Nav_JobName")]
        [FormFieldEdit]
        public Guid? JOB_NAME_ID { get; set; }

        /// <summary>
        /// 导航属性：关键许可工作票
        /// </summary>
        [Description("导航属性：关键许可工作票")]
        public T_FO_CRUCIAL_LICENSE_JOB Nav_JobName { get; set; }



        /// <summary>
        /// 关键许可工作票
        /// </summary>
        [Description("关键许可工作票(外包)")]
        [DataFieldForeignKey("Nav_JobNameOut")]
        [FormFieldEdit]
        public Guid? JOB_NAME_OUTSOURCE_ID { get; set; }

        /// <summary>
        /// 导航属性：关键许可工作票
        /// </summary>
        [Description("导航属性：关键许可工作票(外包)")]
        public T_FO_CRUCIAL_LICENSE_JOB_OUTSOURCE Nav_JobNameOut { get; set; }


        [Description("交底时间")]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime? DISCLOSURE_DATE { get; set; }

        [Description("作业地点")]
        [FormFieldTable]
        [FormFieldQuery]
        public string JOB_LOCATION { get; set; }



        [Description("交底人")]
        [DataFieldForeignKey("Nav_DisclosurePerson")]
        [FormFieldEdit]
        public Guid? DISCLOSURE_PERSON_ID { get; set; }

        /// <summary>
        /// 导航属性：作业环节
        /// </summary>
        [Description("导航属性：交底人")]
        public T_FM_USER Nav_DisclosurePerson { get; set; }

        [Description("被交底人")]
        [DataFieldForeignKey("Nav_DisclosuredPerson")]
        [FormFieldEdit]
        public Guid? DISCLOSURED_PERSON_ID { get; set; }

        /// <summary>
        /// 导航属性：作业环节
        /// </summary>
        [Description("导航属性：被交底人")]
        public T_FM_USER Nav_DisclosuredPerson { get; set; }

        [Description("交底内容")]
        [DataFieldLength(2000)]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string DisclosureContent { get; set; }

        [Description("是否自动生成")]
        [EnumName("ISImportantEnum")]
        public int IS_AUTO { get; set; }

        /// <summary>
        /// 表单状态
        /// </summary>
        [EnumName("FOTeamActivityState")]
        [Description("表单状态")]
        [FormFieldTable]
        [FormFieldQuery]
        public int FORM_STATUS { get; set; }

        [Description("提交并通知")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }

        [Description("导航属性：被交底人")]
        [FormFieldEdit]
        public ICollection<T_FO_TECH_DISCLOSURE_PERSON> Nav_Person { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }
        [Description("部门ID")]
        public Guid? DEPARTMENT_ID { get; set; }

        [Description("是否外包")]
        public bool IS_OUTSOURCE { get; set; }

        /// <summary>
        /// 相关方
        /// </summary>
        [Description("相关方")]
        public Guid? RELATED_ID { get; set; }
    }
}
