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

namespace APT.MS.Domain.Entities.DM
{
    [Description("设备设施维保计划明细")]
    public class T_DM_DEVICE_MAINTENANCE_PLAN_DETAIL : MesEntityBase
    {
        /// <summary>
        /// 设备设施维保计划
        /// </summary>
        [Description("设备设施维保计划")]
        [DataFieldForeignKey("Nav_Plan", "Nav_PlanDetails")]
        public Guid? DEVICE_MAINTENANCE_PLAN_ID { get; set; }

        /// <summary>
        /// 设备设施维保计划
        /// </summary>
        [Description("设备设施维保计划")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public virtual T_DM_DEVICE_MAINTENANCE_PLAN Nav_Plan { 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; }

        /// <summary>
        /// 规格
        /// </summary>
        [Description("规格")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldLength(200)]
        public string SPEC { get; set; }

        /// <summary>
        /// 数量
        /// </summary> 
        [Description("数量")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        public int COUNT { get; set; }

        /// <summary>
        /// 位置
        /// </summary>
        [Description("位置")]
        [FormFieldTable]
        [FormFieldQuery]
        [FormFieldEdit]
        [DataFieldLength(200)]
        public string POSITION { get; set; }

        /// <summary>
        /// 触发频率
        /// </summary>
        [Description("触发频率")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public BSPLANCHECKFREQUENCYEnum PLANCHECKFREQUENCY { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [Description("开始时间")]
        [FormFieldEdit]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime RUNSETTIME { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        [Description("结束时间")]
        [FormFieldEdit]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime ENDTIME { get; set; }

        /// <summary>
        /// 维保内容
        /// </summary>
        [Description("维保内容")]
        [DataFieldLength(200)]
        public string CONTENTS { 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; }

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

        /// <summary>
        ///下次维保日期
        /// </summary>
        [Description("下次维保日期")]
        [DataFieldIngore]
        public DateTime? NEXT_DATE { get; set; }
    }
}
