2022-11-10 11:08:24 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace FrontendWebApi.Models
|
2022-11-08 16:57:31 +08:00
|
|
|
|
{
|
2022-11-10 11:08:24 +08:00
|
|
|
|
public class Alert
|
2022-11-08 16:57:31 +08:00
|
|
|
|
{
|
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
|
2022-11-08 16:57:31 +08:00
|
|
|
|
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; } } //發生時間顯示
|
2022-11-08 16:57:31 +08:00
|
|
|
|
}
|
2022-12-08 18:26:23 +08:00
|
|
|
|
|
|
|
|
|
public class FindFormId
|
|
|
|
|
{
|
|
|
|
|
public string uuid { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-08 16:57:31 +08:00
|
|
|
|
}
|