This commit is contained in:
Henry Hiles 2026-01-23 13:47:21 +00:00
commit a012a2e762
No known key found for this signature in database
12 changed files with 156 additions and 199 deletions

View file

@ -0,0 +1,18 @@
import "package:freezed_annotation/freezed_annotation.dart";
part "sync_status.freezed.dart";
part "sync_status.g.dart";
@freezed
abstract class SyncStatus with _$SyncStatus {
const factory SyncStatus({
required Type type,
required int errorCount,
required int lastSync,
}) = _SyncStatus;
factory SyncStatus.fromJson(Map<String, Object?> json) =>
_$SyncStatusFromJson(json);
}
@JsonEnum(fieldRename: FieldRename.snake)
enum Type { ok, waiting, erroring, permanentlyFailed }