using APT.BaseData.Domain.Entities;
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_JOB_EVENT_RECORD : 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_Meeting")]
        [FormFieldEdit]
        public Guid? SHIFT_MEETING_RECORD_ID { get; set; }

        /// <summary>
        /// 导航属性：班前会议记录表
        /// </summary>
        [Description("导航属性：班前会议记录表")]
        public T_FO_PRE_SHIFT_MEETING_RECORD Nav_Meeting { get; set; }


        [Description("导航属性：作业活动记录分人员表")]
        [FormFieldEdit]
        public ICollection<T_FO_JOB_EVENT_PERSON> Nav_JobEventPerson { get; set; }

        [Description("作业时间")]
        [FormFieldTable]
        [FormFieldQuery]
        public string JOB_DATE { get; set; }

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

        [Description("导航属性：作业前安全确认")]
        [FormFieldEdit]
        public ICollection<T_FO_JOB_EVENT_DETAIL> Nav_Details { get; set; }

        [Description("导航属性：流程及安全措施")]
        [FormFieldEdit]
        public ICollection<T_FO_JOB_EVENT_FLOW> Nav_Flow { get; set; }
        [Description("导航属性：作业后处理措施")]
        [FormFieldEdit]
        public ICollection<T_FO_JOB_EVENT_MEASURE> Nav_Measure { get; set; }

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

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

        [Description("导航属性：创建人")]
        public virtual T_FM_USER Nav_CreateUser { get; set; }
        [DataFieldIngore]
        public int IS_OVERTIME { get; set; }

        [Description("部门ID")]
        public Guid? DEPARTMENT_ID { get; set; }

        [Description("驳回意见")]
        [DataFieldIngore]
        public string CONTEXT { get; set; }

        [Description("部门名称")]
        public string PARENT_NAME { get; set; }
    }
}
