26 lines
665 B
C#
26 lines
665 B
C#
using SqlSugar;
|
|
|
|
namespace YY.Admin.Core.Models;
|
|
|
|
/// <summary>
|
|
/// 设备本地状态快照。
|
|
/// </summary>
|
|
[SugarTable("device_status_snapshot")]
|
|
public class DeviceStatus
|
|
{
|
|
[SugarColumn(IsPrimaryKey = true, Length = 64)]
|
|
public string DeviceId { get; set; } = string.Empty;
|
|
|
|
[SugarColumn(IsNullable = false)]
|
|
public bool IsOnline { get; set; }
|
|
|
|
[SugarColumn(IsNullable = true)]
|
|
public DateTime? LastHeartbeatAt { get; set; }
|
|
|
|
[SugarColumn(ColumnDataType = "TEXT", IsNullable = true)]
|
|
public string? StatusJson { get; set; }
|
|
|
|
[SugarColumn(IsNullable = false)]
|
|
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
}
|