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

namespace APT.BaseData.Domain.Entities.FM
{
    [Description("跑批日志表")]
    public class T_FM_SYNC_LOG : MesEntityBase
    {
        /// <summary>
        /// 请求编码
        /// </summary>
        [DataFieldLength(50)]
        [Description("请求编码")]
        [FormFieldTable]
        [FormFieldQuery]
        public string TRACEIDENTIFIER { get; set; }

        /// <summary>
        /// 请求编码
        /// </summary>
        [DataFieldLength(50)]
        [Description("请求编码")]
        [FormFieldTable]
        [FormFieldQuery]
        public string TRACEIDENTIFIERED { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [Description("开始时间")]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime START_TIME { get; set; }

        /// <summary>
        /// 结束时间(可能不回写，取明细最后的值)
        /// </summary>
        [Description("结束时间")]
        [FormFieldTable]
        [FormFieldQuery]
        public DateTime END_TIME { get; set; }

        /// <summary>
        /// 接口名称
        /// </summary>
        [Description("接口名称")]
        [DataFieldLength(200)]
        [FormFieldTable]
        [FormFieldQuery]
        public string API_NAME { get; set; }

        /// <summary>
        /// 日志类型
        /// </summary>
        [Description("日志类型")]
        [FormFieldTable]
        [FormFieldQuery]
        public Enums.SyncLogType? LOGTYPE { get; set; }

        /// <summary>
        /// 数据条数
        /// </summary>
        [Description("数据条数")]
        [FormFieldTable]
        [FormFieldQuery]
        public int DATA_COUNT { get; set; } = 0;

        /// <summary>
        /// 是否成功
        /// </summary>
        [Description("是否成功")]
        public bool IS_SUCCESS { get; set; } = true;

        /// <summary>
        /// 参数(来自：T_FM_SYNC_TASK)
        /// </summary>
        [Description("参数")]
        [DataFieldLength(100)]
        [FormFieldTable]
        [FormFieldQuery]
        public string SYNC_PARAM { get; set; }

        /// <summary>
        /// 是否已经插入到数据库 
        /// </summary>
        [DataFieldIngore]
        public bool ISINSERT { get; set; } = false;
    }
}
