using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace MyCore.Interfaces.DTO { public class DeviceSummaryDTO { public string Id { get; set; } public string HomeId { get; set; } public string Description { get; set; } public string Name { get; set; } public string Model { get; set; } public DeviceType Type { get; set; } public bool Status { get; set; } public ConnectionStatus ConnectionStatus { get; set; } public string RoomId { get; set; } public string ProviderId { get; set; } public string ProviderName { get; set; } public DateTime LastStateDate { get; set; } public DateTime LastMessageDate { get; set; } public bool Battery { get; set; } public int BatteryStatus { get; set; } } public class DeviceDetailDTO : DeviceSummaryDTO { public string FirmwareVersion { get; set; } public string HardwareVersion { get; set; } public int Port { get; set; } public List MeansOfCommunications { get; set; } public DateTime CreatedDate { get; set; } public DateTime UpdatedDate { get; set; } public string LastMessage { get; set; } // TODO UNIFORMISATION ? public string LastState { get; set; } // TODO UNIFORMISATION ? public string IpAddress { get; set; } public string ServiceIdentification { get; set; } public string ManufacturerName { get; set; } public List GroupIds { get; set; } public string Properties { get; set; } // Dictionary public List SupportedOperations { get; set; } public bool IsContact { get; set; } public bool Contact { get; set; } public bool IsIlluminance { get; set; } public int? Illuminance { get; set; } public bool IsBrightness { get; set; } public int Brightness { get; set; } public bool IsState { get; set; } public bool State { get; set; } public bool IsColorTemp { get; set; } public int ColorTemp { get; set; } public bool IsColorXY { get; set; } public int ColorX { get; set; } public int ColorY { get; set; } public bool IsOccupation { get; set; } public bool Occupation { get; set; } public bool IsAlarm { get; set; } public bool Alarm { get; set; } public bool IsWaterLeak { get; set; } public bool WaterLeak { get; set; } public bool IsSmoke { get; set; } public bool Smoke { get; set; } public bool IsVibration { get; set; } public bool Vibration { get; set; } public bool IsAction { get; set; } public string Action { get; set; } public bool IsTemperature { get; set; } public decimal? Temperature { get; set; } public bool IsHumidity { get; set; } public decimal? Humidity { get; set; } public bool IsPressure { get; set; } // Example : 1005.7hPa public decimal? Pressure { get; set; } // Example : 1005.7hPa public bool IsAirQuality { get; set; } public string AirQuality { get; set; } public bool IsFanSpeed { get; set; } public int FanSpeed { get; set; } public bool IsFanMode { get; set; } public string FanMode { get; set; } public bool IsConsumption { get; set; } // Example: 256.88kWh public decimal Consumption { get; set; } // Example: 256.88kWh public bool IsCurrentPower { get; set; } // Example: 0.0384A public decimal CurrentPower { get; set; } // Example: 0.0384A public bool IsVoltage { get; set; } // Example: 230V public decimal Voltage { get; set; } // Example: 230V public bool IsLinkQuality { get; set; } // Example: 84 LQI public int LinkQuality { get; set; } // Example: 84 LQI public bool IsCO2 { get; set; } public int CO2 { get; set; } public bool IsNoise { get; set; } public int Noise { get; set; } // decibel } }