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.DM
{
    [Description("设备设施报废")]
    [DataRuleField("DEPARTMENT_ID")]
    public class T_DM_DEVICE_SCRAP : MesEntityBase
    {
        [Description("报废编码")]
        public string CODE { get; set; }

        [Description("报废原因")]
        public string REASON { get; set; }
        /// <summary>
        /// 设备设施库
        /// </summary>
        [Description("设备设施库")]
        [DataFieldForeignKey("Nav_DeviceBase")]
        public Guid? DEVICEBASE_ID { get; set; }

        /// <summary>
        /// 设备设施库
        /// </summary>
        [Description("设备设施库")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public virtual T_DM_DEVICE_BASE Nav_DeviceBase { 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; }

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

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

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

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