AlarmInformation.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using Newtonsoft.Json;
  6. using Newtonsoft.Json.Converters;
  7. namespace Edge.WebHost.Models
  8. {
  9. [JsonConverter(typeof(StringEnumConverter))]
  10. public enum Severity
  11. {
  12. Error,
  13. Warning,
  14. Information
  15. }
  16. public class AlarmInformation
  17. {
  18. //unique value
  19. public string Key { get; set; }
  20. //Message will be displayed on alarm bar
  21. public string Description { get; set; }
  22. //The time stamp when the alarm/info added
  23. public DateTime? OccurTime { get; set; }
  24. //used to set the information type, it's a alarm/warning/information
  25. public Severity Severity { get; set; }
  26. //may be a url which used to open a new page
  27. public string Action { get; set; }
  28. public bool Acked { get; set; }
  29. /// <summary>
  30. /// Indicate where is the message from
  31. /// </summary>
  32. public string Module { get; set; }
  33. }
  34. }