Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
66
lib/features/logs/data/models/system_metrics_model.dart
Normal file
66
lib/features/logs/data/models/system_metrics_model.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
/// Modèle des métriques système
|
||||
/// Correspond à SystemMetricsResponse du backend
|
||||
library system_metrics_model;
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'system_metrics_model.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class SystemMetricsModel extends Equatable {
|
||||
final double? cpuUsagePercent;
|
||||
final double? memoryUsagePercent;
|
||||
final double? diskUsagePercent;
|
||||
final double? networkUsageMbps;
|
||||
final int? activeConnections;
|
||||
final double? errorRate;
|
||||
final int? averageResponseTimeMs;
|
||||
final int? uptime;
|
||||
final String? uptimeFormatted;
|
||||
final int? totalLogs24h;
|
||||
final int? totalErrors24h;
|
||||
final int? totalWarnings24h;
|
||||
final int? totalRequests24h;
|
||||
final DateTime? timestamp;
|
||||
|
||||
const SystemMetricsModel({
|
||||
this.cpuUsagePercent,
|
||||
this.memoryUsagePercent,
|
||||
this.diskUsagePercent,
|
||||
this.networkUsageMbps,
|
||||
this.activeConnections,
|
||||
this.errorRate,
|
||||
this.averageResponseTimeMs,
|
||||
this.uptime,
|
||||
this.uptimeFormatted,
|
||||
this.totalLogs24h,
|
||||
this.totalErrors24h,
|
||||
this.totalWarnings24h,
|
||||
this.totalRequests24h,
|
||||
this.timestamp,
|
||||
});
|
||||
|
||||
factory SystemMetricsModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$SystemMetricsModelFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$SystemMetricsModelToJson(this);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
cpuUsagePercent,
|
||||
memoryUsagePercent,
|
||||
diskUsagePercent,
|
||||
networkUsageMbps,
|
||||
activeConnections,
|
||||
errorRate,
|
||||
averageResponseTimeMs,
|
||||
uptime,
|
||||
uptimeFormatted,
|
||||
totalLogs24h,
|
||||
totalErrors24h,
|
||||
totalWarnings24h,
|
||||
totalRequests24h,
|
||||
timestamp,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user