using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace NEIntelligentControl2.Models.Alarm { /// /// 故障信息包装 /// public class FaultInfoModel { /// /// 是否允许复位 /// public bool AllowRest { get; set; } /// /// 设备ID /// public string ThingId { get; set; } /// /// 设备名称 /// public string ThingName { get; set; } /// /// 报警时间 /// public DateTime AlertTime { get; set; } /// /// 报警内容 /// public string AlertText { get; set; } public int AgCount { get; set; } /// /// 故障信息 /// public FaultInfo FaultInfo { get; set; } public string AlertTimeString { get => AlertTime.ToString("yyyy-MM-dd HH:mm:ss"); } public string AlertString { get { if (FaultInfo.MessageType == 3) { return $"{AlertText} [解除]"; } return AlertText; } } } }