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

namespace APT.MS.Domain.Entities.DM
{
    /// <summary>
    /// 设备设施点检、巡检 检查明细
    /// </summary>
    [Description("设备设施检查明细")]
    public class T_DM_DEVICE_BASE_CHECK : MesEntityBase
    {
        /// <summary>
        /// 设备设施库
        /// </summary>
        [Description("设备设施库")]
        [DataFieldForeignKey("Nav_DeviceBase", "Nav_ListCheck")]
        public Guid DEVICEBASE_ID { get; set; }
        /// <summary>
        /// 导航属性：设备设施库
        /// </summary>
        [Description("导航属性：设备设施库")]
        public T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }

        /// <summary>
        /// 检查类型
        /// </summary>
        [Description("检查类型")]
        [FormFieldTable]
        [FormFieldQuery]
        public CheckType CHECKTYPE { get; set; }

        /// <summary>
        /// 点检时间
        /// </summary>
        [Description("点检时间")]
        [FormFieldEdit]
        public DateTime CHECKTIME { get; set; }

        /// <summary>
        /// 检查周期
        /// </summary>
        [Description("检查周期")]
        [FormFieldTable]
        [FormFieldEdit]
        [FormFieldQuery]
        public BSPLANCHECKFREQUENCYEnum? PLANCHECKFREQUENCY { get; set; }

        /// <summary>
        /// 检查日期（日期 针对单次 有效） 例如：05-01,12-01
        /// </summary>
        [Description("检查日期")]
        [FormFieldEdit]
        public string RUNDATA { get; set; }

        /// <summary>
        /// 触发频率（日 针对每月/每季 有效）
        /// </summary>
        [Description("日")]
        [FormFieldEdit]
        public int? DATA { get; set; }

        /// <summary>
        /// 触发频率（星期 针对每周 有效）
        /// </summary>
        [Description("星期")]
        [FormFieldEdit]
        public WEEKDATAEnum? WEEKDATA { get; set; }


        /// <summary>
        /// 点检部位
        /// </summary>
        [Description("点检部位")]
        [DataFieldLength(200)]
        [FormFieldEdit]
        public string ITEM1 { get; set; }


        /// <summary>
        /// 点检内容
        /// </summary>
        [Description("点检内容")]
        [DataFieldLength(500)]
        [FormFieldEdit]
        public string ITEM2 { get; set; }

        /// <summary>
        /// 点检标准
        /// </summary>
        [Description("点检标准")]
        [DataFieldLength(300)]
        [FormFieldEdit]
        public string ITEM3 { get; set; }

        /// <summary>
        /// 点检人
        /// </summary>
        [Description("点检人")]
        public virtual ICollection<T_DM_DEVICE_BASE_CHECK_USER> Nav_ListUser { get; set; }

        /// <summary>
        /// 序号
        /// </summary>
        [Description("序号")]
        public int ROW_NO { get; set; }
    }
}
