You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.6 KiB
100 lines
2.6 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CoreAgent.WebSocketTransport.Models
|
|
{
|
|
/// <summary>
|
|
/// 消息传输协议日志模型
|
|
/// 用于在WebSocket传输层中传输协议日志数据
|
|
/// 与CoreAgent.ProtocolClient中的TransferProtocolLog区分开
|
|
/// </summary>
|
|
public class MessageTransferProtocolLog
|
|
{
|
|
/// <summary>
|
|
/// 主键ID
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 协议层类型
|
|
/// </summary>
|
|
public int LayerType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 消息详情集合(JSON格式存储)
|
|
/// </summary>
|
|
public string? MessageDetailJson { get; set; }
|
|
|
|
/// <summary>
|
|
/// 小区ID
|
|
/// </summary>
|
|
public int? CellID { get; set; }
|
|
|
|
/// <summary>
|
|
/// 国际移动用户识别码
|
|
/// </summary>
|
|
public string? IMSI { get; set; }
|
|
|
|
/// <summary>
|
|
/// 日志方向类型
|
|
/// </summary>
|
|
public int Direction { get; set; }
|
|
|
|
/// <summary>
|
|
/// 用户设备ID
|
|
/// </summary>
|
|
public int? UEID { get; set; }
|
|
|
|
/// <summary>
|
|
/// 公共陆地移动网络标识
|
|
/// </summary>
|
|
public string? PLMN { get; set; }
|
|
|
|
/// <summary>
|
|
/// 时间间隔(毫秒)
|
|
/// </summary>
|
|
public long TimeMs { get; set; }
|
|
|
|
/// <summary>
|
|
/// 时间戳
|
|
/// </summary>
|
|
public long Timestamp { get; set; }
|
|
|
|
/// <summary>
|
|
/// 信息字段
|
|
/// </summary>
|
|
public string? Info { get; set; }
|
|
|
|
/// <summary>
|
|
/// 消息字段
|
|
/// </summary>
|
|
public string? Message { get; set; }
|
|
|
|
/// <summary>
|
|
/// 消息详情集合(用于业务逻辑)
|
|
/// </summary>
|
|
public IEnumerable<string>? MessageDetail
|
|
{
|
|
get => !string.IsNullOrEmpty(MessageDetailJson)
|
|
? Newtonsoft.Json.JsonConvert.DeserializeObject<IEnumerable<string>>(MessageDetailJson)
|
|
: null;
|
|
set => MessageDetailJson = value != null
|
|
? Newtonsoft.Json.JsonConvert.SerializeObject(value)
|
|
: null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 时间间隔(用于业务逻辑)
|
|
/// </summary>
|
|
public TimeSpan Time
|
|
{
|
|
get => TimeSpan.FromMilliseconds(TimeMs);
|
|
set => TimeMs = (long)value.TotalMilliseconds;
|
|
}
|
|
|
|
|
|
}
|
|
}
|