using APT.BaseData.Domain.Entities.FM;
using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.SC.PM;
using APT.MS.Domain.Entities.SC.PT;
using APT.MS.Domain.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;

namespace APT.MS.Domain.Entities.SC.PE
{
    [Description("纠正与预防措施处理单明细表")]
    public class T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL : MesEntityBase
    {
        [Description("纠正与预防措施处理单")]
        [DataFieldForeignKey("Nav_Process", "Nav_Details")]
        public Guid CORRECTIVE_PREVENTIVE_PROCESS_ID { get; set; }

        [Description("纠正与预防措施处理单")]
        public virtual T_PE_CORRECTIVE_PREVENTIVE_PROCESS Nav_Process { get; set; }
        [Description("生产单元")]
        [DataFieldForeignKey("Nav_ProductionUnit")]
        public Guid? PRODUCTION_UNIT_ID { get; set; }

        [Description("生产单元")]
        public virtual T_PE_STANDARDIZED_SCORE_IMPORT Nav_ProductionUnit { get; set; }
        [Description("模块名称")]
        [DataFieldForeignKey("Nav_StandardName")]
        public Guid? STANDARDIZED_ID { get; set; }

        [Description("模块名称")]
        public virtual T_PE_STANDARDIZED_SCORE_IMPORT Nav_StandardName { get; set; }
        [Description("纠正内容")]
        [FormFieldTable]
        [FormFieldQuery]
        public string CONTENTS { get; set; }
        [Description("整改期限")]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime? RECTIFICATION_TIME { get; set; }
        [Description("原因分析")]
        [FormFieldTable]
        [FormFieldQuery]
        public string REASON { get; set; }
        [Description("纠正与预防措施")]
        [FormFieldTable]
        [FormFieldQuery]
        public string CORRECTIVE_PREVENTIVE { get; set; }
        [Description("落实情况")]
        [FormFieldTable]
        [FormFieldQuery]
        [EnumName("PESituationEnum")]
        public PESituationEnum? SITUATION { get; set; }

        [Description("未落实说明")]
        [FormFieldTable]
        [FormFieldQuery]
        public string NOT_CARRY_OUT { get; set; }
        [Description("落实人员")]
        [DataFieldForeignKey("Nav_User")]
        public Guid? USER_ID { get; set; }

        [Description("落实人员")]
        public virtual T_FM_USER Nav_User { get; set; }

        [Description("纠正时间")]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime? CORRECT_TIME { get; set; }

        [Description("附件上传")]
        [FormFieldEdit]
        public ICollection<T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL_FILE> Nav_Files { get; set; }

        [Description("处理状态")]
        [EnumName("FOUserShiftStatusEnum")]     //为枚举（0待处理 1已处理）
        public FOUserShiftStatusEnum DEAL_STATUS { get; set; }
    }
}
