ibms-dome/FrontendWebApi/Models/Alert.cs

40 lines
1.3 KiB
C#
Raw Normal View History

2022-11-10 11:08:24 +08:00
using System;
using System.Collections.Generic;
namespace FrontendWebApi.Models
{
2022-11-10 11:08:24 +08:00
public class Alert
{
2022-11-10 11:08:24 +08:00
public string buildingFloorName { get; set; } //building_name and floor_name
public string uuid { get; set; } //error_code
public string alarmClass { get; set; } //error_type
public string msgText { get; set; } //error_reason
public string sourceName_zh { get; set; } //device_number
public string ackState { get; set; } //ACKconfirm: Acked/Unacked
public DateTime timestamp { get; set; }//發生時間 occur time
public string formId { get; set; }
2022-11-10 11:08:24 +08:00
public string ackState_zh
{
get
{
Dictionary<string, string> name = new Dictionary<string, string>()
{
{ "Acked" , "確認" },
{ "Unacked" , "未確認" }
};
return name[ackState];
}
}
public string created_at { get { return timestamp.ToString(); } set { } }
public string Created_at { get { return Convert.ToDateTime(created_at).ToString("yyyy-MM-dd HH:mm:ss"); } set { created_at = value; } } //發生時間顯示
}
public class FindFormId
{
public string uuid { get; set; }
public string formId { get; set; }
}
}