/// Modèle de sauvegarde /// Correspond à BackupResponse du backend library backup_model; import 'package:equatable/equatable.dart'; import 'package:json_annotation/json_annotation.dart'; part 'backup_model.g.dart'; @JsonSerializable(explicitToJson: true) class BackupModel extends Equatable { final String? id; final String? name; final String? description; final String? type; // AUTO, MANUAL, RESTORE_POINT final int? sizeBytes; final String? sizeFormatted; final String? status; // PENDING, IN_PROGRESS, COMPLETED, FAILED final DateTime? createdAt; final DateTime? completedAt; final String? createdBy; final bool? includesDatabase; final bool? includesFiles; final bool? includesConfiguration; final String? filePath; final String? errorMessage; const BackupModel({ this.id, this.name, this.description, this.type, this.sizeBytes, this.sizeFormatted, this.status, this.createdAt, this.completedAt, this.createdBy, this.includesDatabase, this.includesFiles, this.includesConfiguration, this.filePath, this.errorMessage, }); factory BackupModel.fromJson(Map json) => _$BackupModelFromJson(json); Map toJson() => _$BackupModelToJson(this); @override List get props => [ id, name, description, type, sizeBytes, sizeFormatted, status, createdAt, completedAt, createdBy, includesDatabase, includesFiles, includesConfiguration, filePath, errorMessage, ]; }