ibms-dome/FrontendWebApi/Models/Device.cs

98 lines
2.7 KiB
C#
Raw Normal View History

using iTextSharp.xmp.impl;
using System;
using System.Collections.Generic;
2022-11-15 17:36:23 +08:00
namespace FrontendWebApi.Models
{
public class FindDevice
{
public string main_system_tag { get; set; }
public string building_tag { get; set; }
public string floor_tag { get; set; }
public string device_guid { get; set; }
2022-11-15 17:36:23 +08:00
}
public class BuildList
{
public string full_name { get; set; }
public string building_tag { get; set; }
}
public class FloorList
{
public string full_name { get; set; }
public string floor_tag { get; set; }
public string map_name { get; set; }
public string floor_map_name { get; set; }
2022-11-15 17:36:23 +08:00
public List<DeviceLists> device_list {get; set;}
}
public class DeviceLists
{
public string device_guid { get; set; }
public string full_name { get; set; }
public string device_coordinate { get; set; }
public string device_coordinate_3d { get; set; }
2022-11-15 17:36:23 +08:00
public string status { get; set; }
public string device_status
{
get
{
Dictionary<string, string> name = new Dictionary<string, string>()
{
{ "0", "關閉"},
{ "1", "正常"},
{ "2", "異常"}
};
return name[status];
}
}
2022-11-16 10:55:35 +08:00
public string device_master_icon { get; set; }
2022-11-15 17:36:23 +08:00
}
public class DeviceBaseInfo
{
public string device_number { get; set; }
public string device_coordinate { get; set; }
public string device_coordinate_3d { get; set; }
public string full_name { get; set; }
public string device_ip { get; set; }
}
public class DeviceOpeRecord
{
public string fix_do { get; set; }
public byte work_type { get; set; }
public string work_type_name
{
get
{
Dictionary<byte, string> name = new Dictionary<byte, string>()
{
{ 1 , "保養" },
{ 2 , "維修" }
};
return name[work_type];
}
}
public string work_person_name { get; set; }
public DateTime finish_time { get; set; }
public DateTime created_at { get; set; }
public string Created_at
{
get
{
return Convert.ToDateTime(created_at).ToString("yyyy-MM-dd HH:mm:ss");
}
} //創建時間
public string Finish_time
{
get
{
return Convert.ToDateTime(finish_time).ToString("yyyy-MM-dd HH:mm:ss");
}
} //結束時間
}
2022-11-15 17:36:23 +08:00
}