using Microsoft.EntityFrameworkCore;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Models.Models.LOGDB
{
    /// <summary>
    /// RUCS MSG消息处理日志
    /// </summary>
    [Table("TBL_MSG_LOG"), Comment("RUCS RUCS MSG消息处理日志")]
    public class TBL_MSG_LOG
    {
        /// <summary>
        /// 自增id
        /// </summary>
        [Key, Column(TypeName = "int"), Comment("id,自增长"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }
        /// <summary>
        /// 生产者根据时间精确到mS生产ID 
        /// </summary>
        [ Column(TypeName = "nvarchar(100)"), Comment("生产者根据时间精确到mS生产ID ")]
        public string MSG_ID { get; set; }

        /// <summary>
        /// 方向
        /// </summary>
        [ Column(TypeName = "nvarchar(100)"), Comment("方向")]
        public string DIRECTION { get; set; }

        /// <summary>
        /// 时间（精确到mS）
        /// </summary>

        [Required, Column(TypeName = "datetime"), Comment("时间（精确到mS）")]

        public DateTime DATETIME { get; set; }


        /// <summary>
        /// 距离同主题上一包发送间隔
        /// </summary>
        [ Column(TypeName = "int"), Comment("距离同主题上一包发送间隔")]
        public int LAST_PUB_TIMEOUT { get; set; }

        
        /// <summary>
        /// 距离同主题上一包接收间隔 
        /// </summary>
        [ Column(TypeName = "int"), Comment("距离同主题上一包接收间隔 ")]
        public int LAST_SUB_TIMEOUT { get; set; }


        /// <summary>
        /// 长度 
        /// </summary>
        [ Column(TypeName = "int"), Comment("长度 ")]
        public int LENGTH { get; set; }




        /// <summary>
        /// 内容
        /// </summary>
        [ Column(TypeName = "nvarchar(100)"), Comment("内容")]
        public string CONTENT { get; set; }

        /// <summary>
        /// 处理耗时 
        /// </summary>
        [ Column(TypeName = "int"), Comment("处理耗时 ")]
        public int PROCESSING_TIMESPENT { get; set; }

        /// <summary>
        /// 数据是否有效 
        /// </summary>
        [ Column(TypeName = "int"), Comment("数据是否有效 ")]
        public int DATA_VALID { get; set; }

        /// <summary>
        /// 处理结果 
        /// </summary>
        [ Column(TypeName = "int"), Comment("处理结果 ")]
        public int RESULT { get; set; }



        /// <summary>
        /// 关联TCP_ID
        /// </summary>
        [ Column(TypeName = "int"), Comment("关联TCP_ID  ")]
        public int TCP_ID { get; set; }


        /// <summary>
        /// 关联UDP_ID
        /// </summary>
        [ Column(TypeName = "int"), Comment("关联UDP_ID")]
        public int UDP_ID { get; set; }

        /// <summary>
        /// 备注
        /// </summary>

        [Column(TypeName = "nvarchar(520)"), Comment("备注")]

        public string REMARK { get; set; }


        /// <summary>
        ///   消息生产者
        /// </summary>

        [Column(TypeName = "nvarchar(100)"), Comment("消息主题")]

        public string PRODUCER { get; set; }


        /// <summary>
        ///   消息主题
        /// </summary>

        [Column(TypeName = "nvarchar(100)"), Comment("消息主题")]

        public string MSG_TOPIC { get; set; }

        

    }
}
