Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
60
lib/features/logs/data/models/system_alert_model.dart
Normal file
60
lib/features/logs/data/models/system_alert_model.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
/// Modèle d'alerte système
|
||||
/// Correspond à SystemAlertResponse du backend
|
||||
library system_alert_model;
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'system_alert_model.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class SystemAlertModel extends Equatable {
|
||||
final String? id;
|
||||
final String? level; // CRITICAL, ERROR, WARNING, INFO
|
||||
final String? title;
|
||||
final String? message;
|
||||
final DateTime? timestamp;
|
||||
final bool? acknowledged;
|
||||
final String? acknowledgedBy;
|
||||
final DateTime? acknowledgedAt;
|
||||
final String? source;
|
||||
final String? alertType;
|
||||
final double? currentValue;
|
||||
final double? thresholdValue;
|
||||
|
||||
const SystemAlertModel({
|
||||
this.id,
|
||||
this.level,
|
||||
this.title,
|
||||
this.message,
|
||||
this.timestamp,
|
||||
this.acknowledged,
|
||||
this.acknowledgedBy,
|
||||
this.acknowledgedAt,
|
||||
this.source,
|
||||
this.alertType,
|
||||
this.currentValue,
|
||||
this.thresholdValue,
|
||||
});
|
||||
|
||||
factory SystemAlertModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$SystemAlertModelFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$SystemAlertModelToJson(this);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
id,
|
||||
level,
|
||||
title,
|
||||
message,
|
||||
timestamp,
|
||||
acknowledged,
|
||||
acknowledgedBy,
|
||||
acknowledgedAt,
|
||||
source,
|
||||
alertType,
|
||||
currentValue,
|
||||
thresholdValue,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user