using APT.Infrastructure.Core;
using System;
using System.ComponentModel;

namespace APT.BaseData.Domain.Entities.FM
{
    /// <summary>
    /// 设备集成信息同步任务
    /// </summary>
   [IgnoreT4]public class T_FM_EQUIPMENT_INTEGRATION_TASK : MesEntityBase
    {
        /// <summary>同步编码</summary>
        [CUnique]
        [Description("同步编号")]
        public string CODE { get; set; }

        /// <summary>
        /// 同步名称
        /// </summary>
        [Description("同步名称")]
        [AcronymField("NAME_ACRONYM")]
        public string NAME { get; set; }

        /// <summary>
        /// 名称首字母缩写
        /// </summary>
        [Description("名称首字母缩写")]
        public string NAME_ACRONYM { get; set; }


        /// <summary>
        /// 同步Api地址
        /// </summary>
        [Description("同步Api地址")]
        public string INTERFACE_ADDRESS { get; set; }
        /// <summary>
        /// 设置同步开始时间
        /// </summary>
        [Description("设置同步开始时间")]
        public DateTime TASK_START_TIME { get; set; }
        /// <summary>
        /// 上一次同步结束时间
        /// </summary>
        [Description("上一次同步结束时间")]
        public DateTime TASK_END_TIME { get; set; }
        /// <summary>
        /// 下一次同步起始时间
        /// </summary>
        [Description("下一次同步起始时间")]
        public DateTime NEXT_START_TIME { get; set; }
        /// <summary>
        /// 用于判断任务执行的时间，如果执行太久可能是异常了
        /// </summary>
        [Description("当前任务开始时间")]
        public DateTime? CURR_TASK_START_TIME { get; set; }
        /// <summary>
        /// 是否同步中
        /// </summary>
        [Description("是否同步中")]
        public bool? IS_SYNCING { get; set; }

        /// <summary>
        /// 同步周期
        /// </summary>
        [Description("同步周期")]
        public int PERIODIC_TIME { get; set; }

        /// <summary>
        /// 周期单位 TimeUnitEnum
        /// </summary>
        [Description("周期单位")]
        [EnumName("TimeUnitEnum")]
        public int? SYNC_UNIT { get; set; }

        [Description("备注")]
        public string REMARK { get; set; }

        /// <summary>
        /// 启用标志 FMEnableStatusEnum
        /// </summary>
        [Description("启用标志")]
        [EnumName("FMEnableStatusEnum")]
        public int ENABLE_STATUS { get; set; }
        /// <summary>
        /// 优先级 数值越大优先级越高 
        /// </summary>
        [Description("优先级")]
        public int PRIORITY_LEVEL { get; set; }
        /// <summary>
        /// 执行次数 
        /// </summary>
        [Description("执行次数")]
        public int EXECUTE_NUM { get; set; }

        /// <summary>
        /// 读取文本路径 
        /// </summary>
        [Description("读取文本路径")]
        public string READ_FILE_PATH { get; set; }

        /// <summary>
        /// 移动文本路径 
        /// </summary>
        [Description("移动文本路径")]
        public string MOVE_FILE_PATH { get; set; }

        [Description("生产中心")]
        public Guid? WORKSTAGE_ID { get; set; }

        //[Description("导航：生产中心表")]
        //public virtual T_FM_WORKSTAGE Nav_WorkStage { get; set; }

        [Description("生产中心")]
        public Guid? SECOND_WORKSTAGE_ID { get; set; }

        //[Description("导航：生产中心表")]
        //public virtual T_FM_WORKSTAGE Nav_SecondWorkStage { get; set; }
    }
}
