using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Models.Models.DEBUGGER_DB
{
    [Table("TBL_UDP_DEBUGGER"), Comment("TBL_UDP_DEBUGGER  接收巫工的UDP调试信息")]
    //  方向 索引
    [Index(nameof(RevDelayDateTime), Name = "Index_RevDelayDateTime")]

    [Index(nameof(CreateDateTime), Name = "Index_CreateDateTime")]

    [Index(nameof(RcvDateTime), Name = "Index_RcvDateTime")]

    [Index(nameof(RcvProcessDateTime), Name = "Index_RcvProcessDateTime")]

    [Index(nameof(ID), IsUnique = true)]
    
    public class TBL_UDP_DEBUGGER
    {
        /// <summary>
        /// 自增id
        /// </summary>
        [Key, Column(TypeName = "int"), Comment("id,自增长"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }
        [Comment("udp 发送过来的sn  有最大值 65536 范围是  1 - 65535")]

        public int SN { get; set; }

        [Column(TypeName = "datetime"), Comment("CreateDateTime  调试信息的产生时间")]
        public DateTime CreateDateTime { get; set; }
        
        [Comment("调试信息的类型  ")]

        public int DataType { get; set; }
       
        [Comment("调试信息-自定义")]

        public long Custom{ get; set; }
         

        public int Datalen { get; set; }

        [Comment("调试信息1 ")]

        public string DataString1 { get; set; }

        [Comment("调试信息 2")]

        public string DataString2 { get; set; }

        [Comment("调试信息3 ")]
        public string DataString3 { get; set; }

        [Comment("调试信息4 ")]

        public string DataString4 { get; set; }
        [Comment("调试信息5 ")]

        public string DataString5 { get; set; }
        [Comment("调试信息6 ")]

        public string DataString6 { get; set; }
        [Comment("调试信息7 ")]

        public string DataString7 { get; set; }
        [Comment("调试信息8 ")]

        public string DataString8 { get; set; }
        [Comment("调试信息9")]

        public string DataString9 { get; set; }

        [Comment("调试信息10")]

        public string DataString10 { get; set; }

        [Column(TypeName = "datetime"), Comment("RcvDelayDateTime  接收时间")]
        public DateTime RcvDateTime { get; set; }

        [ Comment("RevDateTime  接收间隔 ms = 接收时间 - 调试信息的产生时间")]
        public int RevDelayDateTime { get; set; }

        [Comment("RcvProcessDateTime  处理耗时 ms")]
        public int RcvProcessDateTime { get; set; }

    }
}
