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;

namespace APT.MS.Domain.Entities.DM
{
    /// <summary>
    /// 设备设施库采购记录
    /// </summary>
    [Description("设备设施库采购记录")]
    [DataRuleField("DEPARTMENT_ID")]
    public class T_DM_DEVICE_BASE_PURCHASE : MesEntityBase
    {
        /// <summary>
        /// 采购编号
        /// </summary>
        [Description("采购编号")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string CODE { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [Description("备注")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public string REMARK { get; set; }
        /// <summary>
        /// TPM_ID
        /// </summary>
        [Description("TPM_ID")]
        public Guid TPM_ID { get; set; }
        /// <summary>
        ///采购部门
        /// </summary>
        [Description("采购部门")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_Department")]
        public Guid? DEPARTMENT_ID { get; set; }
        /// <summary>
        /// 采购部门
        /// </summary>
        [Description("采购部门")]
        public T_FM_DEPARTMENT Nav_Department { get; set; }
        /// <summary>
        ///采购人
        /// </summary>
        [Description("采购人")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldForeignKey("Nav_User")]
        public Guid? USER_ID { get; set; }
        /// <summary>
        /// 采购人
        /// </summary>
        [Description("采购人")]
        public T_FM_USER Nav_User { get; set; }
        /// <summary>
        /// 设备明细
        /// </summary>
        [Description("设备明细")]
        public List<T_DM_DEVICE_BASE_PURCHASE_DETAIL> Nav_Details { get; set; }

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

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

        /// <summary>
        /// 生产单元
        /// </summary>
        [Description("生产单元")]
        [EnumName("FMProductionUnit")]
        public int? MineType { get; set; }
        /// <summary>
        /// 步骤0表示申购表，步骤1表示采购记录表
        /// </summary>
        [Description("步骤")]
        public int NUM { get; set; }

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