Initial commit: unionflow-mobile-apps
Application Flutter complète (sans build artifacts). Signed-off-by: lions dev Team
This commit is contained in:
45
lib/features/settings/data/models/cache_stats_model.dart
Normal file
45
lib/features/settings/data/models/cache_stats_model.dart
Normal file
@@ -0,0 +1,45 @@
|
||||
/// Modèle des statistiques de cache système
|
||||
/// Correspond à CacheStatsResponse du backend
|
||||
library cache_stats_model;
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'cache_stats_model.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class CacheStatsModel extends Equatable {
|
||||
final int? totalSizeBytes;
|
||||
final String? totalSizeFormatted;
|
||||
final int? totalEntries;
|
||||
final double? hitRate;
|
||||
final int? hits;
|
||||
final int? misses;
|
||||
final DateTime? lastCleared;
|
||||
|
||||
const CacheStatsModel({
|
||||
this.totalSizeBytes,
|
||||
this.totalSizeFormatted,
|
||||
this.totalEntries,
|
||||
this.hitRate,
|
||||
this.hits,
|
||||
this.misses,
|
||||
this.lastCleared,
|
||||
});
|
||||
|
||||
factory CacheStatsModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CacheStatsModelFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$CacheStatsModelToJson(this);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
totalSizeBytes,
|
||||
totalSizeFormatted,
|
||||
totalEntries,
|
||||
hitRate,
|
||||
hits,
|
||||
misses,
|
||||
lastCleared,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user