Files
unionflow-mobile-apps/lib/features/logs/data/models/system_log_model.dart
dahoud d094d6db9c Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts).

Signed-off-by: lions dev Team
2026-03-15 16:30:08 +00:00

55 lines
1.3 KiB
Dart

/// Modèle d'entrée de log système
/// Correspond à SystemLogResponse du backend
library system_log_model;
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'system_log_model.g.dart';
@JsonSerializable(explicitToJson: true)
class SystemLogModel extends Equatable {
final String? id;
final String? level; // CRITICAL, ERROR, WARN, INFO, DEBUG, TRACE
final String? source; // API, Auth, Database, Cache, Security, Performance, System
final String? message;
final String? details;
final DateTime? timestamp;
final String? username;
final String? ipAddress;
final String? requestId;
final String? stackTrace;
const SystemLogModel({
this.id,
this.level,
this.source,
this.message,
this.details,
this.timestamp,
this.username,
this.ipAddress,
this.requestId,
this.stackTrace,
});
factory SystemLogModel.fromJson(Map<String, dynamic> json) =>
_$SystemLogModelFromJson(json);
Map<String, dynamic> toJson() => _$SystemLogModelToJson(this);
@override
List<Object?> get props => [
id,
level,
source,
message,
details,
timestamp,
username,
ipAddress,
requestId,
stackTrace,
];
}