You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
using System.Collections.Generic ;
namespace CncModels.Dto.Alert
{
/// <summary>
/// 告警统计结果(未处理告警分类型统计)
/// </summary>
public class AlertStatisticsResponse
{
/// <summary>未处理告警总数(前端用 unresolved) </summary>
public int UnresolvedCount { get ; set ; }
/// <summary>按告警类型统计的未处理数量</summary>
public Dictionary < string , int > UnresolvedByType { get ; set ; } = new Dictionary < string , int > ( ) ;
// 以下为前端 AlertStats 接口需要的扁平字段
/// <summary>未处理总数(前端字段名 unresolved) </summary>
public int Unresolved = > UnresolvedCount ;
/// <summary>采集失败未处理数</summary>
public int CollectFail = > UnresolvedByType . TryGetValue ( "collect_fail" , out var v ) ? v : 0 ;
/// <summary>设备离线未处理数</summary>
public int DeviceOffline = > UnresolvedByType . TryGetValue ( "device_offline" , out var v ) ? v : 0 ;
/// <summary>产量异常未处理数</summary>
public int ProductionAnomaly = > UnresolvedByType . TryGetValue ( "production_anomaly" , out var v ) ? v : 0 ;
/// <summary>未知设备未处理数</summary>
public int UnknownDevice = > UnresolvedByType . TryGetValue ( "unknown_device" , out var v ) ? v : 0 ;
}
}