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.DM
{
    [Description("设备设施发放表")]
    [DataRuleField("DEPARTMENT_ID")]
    public class T_DM_DEVICE_ISSUE : MesEntityBase
    {
        [Description("编号")]
        public string CODE { get; set; }
        [Description("发放时间")]
        public DateTime? TIME { get; set; }

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

        [Description("发放人员")]
        [DataFieldForeignKey("Nav_User")]
        public Guid? USER_ID { get; set; }
        [Description("发放人员")]
        public T_FM_USER Nav_User { get; set; }
        /// <summary>
        /// 发放岗位
        /// </summary>
        [Description("发放岗位")]
        [DataFieldForeignKey("Nav_UserPost")]
        public Guid? USER_POST_ID { get; set; }
        /// <summary>
        /// 发放岗位
        /// </summary>
        [Description("发放岗位")]
        public T_FM_USER_POST Nav_UserPost { get; set; }
        [Description("设备设施发放细表")]
        public ICollection<T_DM_DEVICE_ISSUE_DETAIL> Nav_Details { get; set; }
        [Description("状态")]
        [EnumName("PFStandardStatus")]
        public PFStandardStatus STATUS { get; set; }

        [Description("是否发布")]
        [DataFieldIngore]
        public string PUBLISH { get; set; }
        [Description("发放人员")]
        [DataFieldForeignKey("Nav_Apply")]
        public Guid? APPLY_ID { get; set; }
        [Description("发放人员")]
        public T_DM_DEVICE_APPLY Nav_Apply { get; set; }
        [Description("采购表")]
        public Guid? DEVICE_PURCHASE_ID { get; set; }

        /// <summary>
        /// 生产单元
        /// </summary>
        [Description("生产单元")]
        [EnumName("FMProductionUnit")]
        public int? MineType { get; set; }

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