mirror of
https://github.com/immich-app/immich.git
synced 2025-07-31 15:08:44 -04:00
* do not migrate again on app start * migrate backup albums over to sqlite --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
35 lines
651 B
Dart
35 lines
651 B
Dart
import 'package:immich_mobile/utils/hash.dart';
|
|
import 'package:isar/isar.dart';
|
|
|
|
part 'backup_album.entity.g.dart';
|
|
|
|
@Collection(inheritance: false)
|
|
class BackupAlbum {
|
|
String id;
|
|
DateTime lastBackup;
|
|
@Enumerated(EnumType.ordinal)
|
|
BackupSelection selection;
|
|
|
|
BackupAlbum(this.id, this.lastBackup, this.selection);
|
|
|
|
Id get isarId => fastHash(id);
|
|
|
|
BackupAlbum copyWith({
|
|
String? id,
|
|
DateTime? lastBackup,
|
|
BackupSelection? selection,
|
|
}) {
|
|
return BackupAlbum(
|
|
id ?? this.id,
|
|
lastBackup ?? this.lastBackup,
|
|
selection ?? this.selection,
|
|
);
|
|
}
|
|
}
|
|
|
|
enum BackupSelection {
|
|
none,
|
|
select,
|
|
exclude;
|
|
}
|