initial commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'backup_execution.freezed.dart';
|
||||
part 'backup_execution.g.dart';
|
||||
|
||||
/// Mirrors `models.BackupExecution`.
|
||||
@freezed
|
||||
sealed class BackupExecution with _$BackupExecution {
|
||||
const factory BackupExecution({
|
||||
required String id,
|
||||
required DateTime timestamp,
|
||||
required bool success,
|
||||
@JsonKey(name: 'duration_seconds') required int durationSeconds,
|
||||
@Default('') String message,
|
||||
@JsonKey(name: 'target_id') String? targetId,
|
||||
}) = _BackupExecution;
|
||||
|
||||
factory BackupExecution.fromJson(Map<String, dynamic> json) => _$BackupExecutionFromJson(json);
|
||||
}
|
||||
Reference in New Issue
Block a user