fix 标识任务的设备状态

This commit is contained in:
2024-06-21 14:33:38 +08:00
parent e7b5271377
commit 4cc90ec5cc
2 changed files with 24 additions and 4 deletions

View File

@@ -82,4 +82,17 @@ public class DeviceTaskAssignmentResponse
/// 部署点
/// </summary>
public string DeployPlace { get; set; }
}
public int HeartbeatInterval { get; set; }
public DateTime LastHeartbeatTime { get; set; }
public bool IsOffline
{
get
{
if (HeartbeatInterval == 0) return false;
return LastHeartbeatTime.AddSeconds(HeartbeatInterval) > DateTime.Now;
}
}
}