You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.4 KiB
C#

9 months ago
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LanShengModel
{
[SugarTable("LS_TcpDataLog_{year}{month}{day}")]
[SplitTable(SplitType.Day)]
[SugarIndex("TcpDataLog_DTU_INDEX",nameof(TcpDataLog.DTU_ID),OrderByType.Asc,nameof(TcpDataLog.CreateDate),OrderByType.Desc)]
9 months ago
public class TcpDataLog
{
[SugarColumn(IsNullable = true, Length = 10)]
public string? Frame_START { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public int? Frame_Length { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public int? Frame_number { get; set; }
[SugarColumn(IsNullable = true, Length = 200)]
public string? DTU_ID { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public string? Msg_ID { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public int? Checksum { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public string? Frame_END { get; set; }
[SplitField]
[SugarColumn(IsNullable = true)]
public DateTime? CreateDate { get; set; }
}
[SugarTable("LS_TcpDataLog_{year}{month}{day}")]
[SplitTable(SplitType.Day)]
[SugarIndex("TcpDataLog_DTU_INDEX", nameof(TcpDataLog.DTU_ID), OrderByType.Asc, nameof(TcpDataLog.CreateDate), OrderByType.Desc)]
9 months ago
public class TcpDataLog<T>
{
[SugarColumn(IsNullable = true, Length = 10)]
public string? Frame_START { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public int? Frame_Length { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public int? Frame_number { get; set; }
[SugarColumn(IsNullable = true, Length = 200)]
public string? DTU_ID { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public string? Msg_ID { get; set; }
[SugarColumn(IsNullable = true, IsJson = true, ColumnDataType = "Text")]
public T? Content { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public int? Checksum { get; set; }
[SugarColumn(IsNullable = true, Length = 10)]
public string? Frame_END { get; set; }
[SplitField]
[SugarColumn(IsNullable = true)]
public DateTime? CreateDate { get; set; }
}
}