using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums.PF;
using APT.Infrastructure.Core;
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 : MesEntityBase
    {
        [Description("发起人ID")]
        [DataFieldForeignKey("Nav_User")]
        public Guid? USER_ID { get; set; }

        [Description("发起人")]
        public virtual T_FM_USER Nav_User { get; set; }

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

        [Description("发起部门表")]
        public virtual T_FM_DEPARTMENT Nav_Department { get; set; }

        [Description("状态")]
        [FormFieldTable]
        [FormFieldQuery]
        [EnumName("PFStandardStatus")]
        public PFStandardStatus STATUS { get; set; }

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }

        [Description("纠正与预防措施处理单明细表")]
        [FormFieldEdit]
        public ICollection<T_PE_CORRECTIVE_PREVENTIVE_PROCESS_DETAIL> Nav_Details { get; set; }
        
        [Description("纠正与预防措施通知单")]
        [DataFieldForeignKey("Nav_Corrective")]
        public Guid? CORRECTIVE_PREVENTIVE_ID { get; set; }

        [Description("纠正与预防措施通知单")]
        public virtual T_PE_CORRECTIVE_PREVENTIVE Nav_Corrective { get; set; }
    }
}
