using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Repository.Models { public enum BackgroundServiceTaskType : byte { raw_data_archive = 0, //資料歸檔 data_delivery = 1, //資料派送 } public class BackgroundServiceTask { private string complete_at; private string created_at; private string updated_at; public int Id { get; set; } public byte Task_type { get; set; } public string Target_ip { get; set; } public string Target_table { get; set; } public string Mode { get; set; } public string Target_data { get; set; } public string Target_files { get; set; } public int Repeat_times { get; set; } public byte Is_complete { get; set; } public string Complete_at { get { return Convert.ToDateTime(complete_at).ToString("yyyy-MM-dd HH:mm:ss"); } set { complete_at = value; } } public string Created_at { get { return Convert.ToDateTime(created_at).ToString("yyyy-MM-dd HH:mm:ss"); } set { created_at = value; } } public string Updated_at { get { return Convert.ToDateTime(updated_at).ToString("yyyy-MM-dd HH:mm:ss"); } set { updated_at = value; } } } public class FileInfo { public string Folder { get; set; } public string OriginalFileName { get; set; } public string FileName { get; set; } public string File { get; set; } } /// /// 取得niagara資料 /// public class Device_value { public string name { get; set; } public string value { get; set; } public string tag_name { get; set; } public string point_name { get; set; } public string building { get; set; } } public class Device_item8 { public string name { get; set; } public string value { get; set; } public string tag_name { get; set; } public string device_area_tag { get; set; } public string device_building_tag { get; set; } public string device_system_tag { get; set; } public string device_name_tag { get; set; } public string device_floor_tag { get; set; } public string device_master_tag { get; set; } public string device_last_name_tag { get; set; } public string device_serial_tag { get; set; } public string point_name { get; set; } //public string result_value { get; set; } } public class NiagaraTags { public int id { get; set; } public string db_tags { get; set; } public string niagara_tags { get; set; } public string device_area_tag { get; set; } public string device_building_tag { get; set; } public string device_system_tag { get; set; } public string device_name_tag { get; set; } public string device_floor_tag { get; set; } public string device_master_tag { get; set; } public string device_last_name_tag { get; set; } public string device_serial_tag { get; set; } public string atDateTime { get; set; } public int is_used { get; set; } } public class NiagaraTagsForItem { public string device_area_tag { get; set; } public string device_building_tag { get; set; } public string device_system_tag { get; set; } public string device_name_tag { get; set; } public string device_point_name { get; set; } } public class building_menu { public string building_tag { get; set; } public string device_system_tag { get; set; } public string device_name_tag { get; set; } } }