FaultInfoModel.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace NEIntelligentControl2.Models.Alarm
  7. {
  8. /// <summary>
  9. /// 故障信息包装
  10. /// </summary>
  11. public class FaultInfoModel
  12. {
  13. /// <summary>
  14. /// 是否允许复位
  15. /// </summary>
  16. public bool AllowRest { get; set; }
  17. /// <summary>
  18. /// 设备ID
  19. /// </summary>
  20. public string ThingId { get; set; }
  21. /// <summary>
  22. /// 设备名称
  23. /// </summary>
  24. public string ThingName { get; set; }
  25. /// <summary>
  26. /// 报警时间
  27. /// </summary>
  28. public DateTime AlertTime { get; set; }
  29. /// <summary>
  30. /// 报警内容
  31. /// </summary>
  32. public string AlertText { get; set; }
  33. public int AgCount { get; set; }
  34. /// <summary>
  35. /// 故障信息
  36. /// </summary>
  37. public FaultInfo FaultInfo { get; set; }
  38. public string AlertTimeString { get => AlertTime.ToString("yyyy-MM-dd HH:mm:ss"); }
  39. public string AlertString
  40. {
  41. get
  42. {
  43. if (FaultInfo.MessageType == 3)
  44. {
  45. return $"{AlertText} [解除]";
  46. }
  47. return AlertText;
  48. }
  49. }
  50. }
  51. }