using APT.BaseData.Domain.Entities.FM;
using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.HM;
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_SAFE : MesEntityBase
    {
        [Description("编号")]
        [DataFieldLength(100)]
        public string CODE { get; set; }

        [Description("交底事项")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string NAME { get; set; }
        /// <summary>
        /// 作业名称
        /// </summary>
        [Description("作业名称")]
        [DataFieldForeignKey("Nav_OperationStep")]
        public Guid? OPERATION_STEP_ID { get; set; }

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


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

        [Description("交底地点")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public string JOB_LOCATION { get; set; }



        [Description("交底人")]
        [DataFieldForeignKey("Nav_User")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public Guid? USER_ID { get; set; }


        [Description("导航属性：交底人")]
        public T_FM_USER Nav_User { get; set; }
        [Description("交底人部门")]
        [DataFieldForeignKey("Nav_Department")]
        [FormFieldEdit]
        [FormFieldTable]
        [FormFieldQuery]
        public Guid? DEPARTMENT_ID { get; set; }

        [Description("导航属性：交底人部门")]
        public T_FM_DEPARTMENT Nav_Department { get; set; }

        [Description("交底内容")]
        [DataFieldLength(2000)]
        [FormFieldEdit]
        public string DisclosureContent { 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_FROM_SAFE_PERSON> Nav_Person { get; set; }
        [Description("附件")]
        [FormFieldEdit]
        public ICollection<T_FO_TECH_DISCLOSURE_FROM_SAFE_FILE> Nav_Files { get; set; }

        /// <summary>
        /// 关联工作票
        /// </summary>
        [Description("关联工作票")]
        [DataFieldForeignKey("Nav_Job")]
        public Guid? FIRE_JOB_ID { get; set; }

        /// <summary>
        /// 导航属性：关联工作票
        /// </summary>
        [Description("导航属性：关联工作票")]
        public T_FO_FIRE_JOB Nav_Job { get; set; }
    }
}
