mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-01-11 22:40:36 +00:00
38 lines
663 B
Dart
38 lines
663 B
Dart
import 'package:isar_community/isar.dart';
|
|
part 'changed.g.dart';
|
|
|
|
@collection
|
|
@Name("ChangedPart")
|
|
class ChangedPart {
|
|
Id? id;
|
|
@enumerated
|
|
late ActionType actionType;
|
|
int? isarId;
|
|
String data;
|
|
int clientDate;
|
|
|
|
ChangedPart({
|
|
this.id = Isar.autoIncrement,
|
|
required this.actionType,
|
|
this.isarId,
|
|
required this.data,
|
|
required this.clientDate,
|
|
});
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'action': actionType.name,
|
|
'isarId': isarId,
|
|
'data': data,
|
|
'clientDate': clientDate,
|
|
};
|
|
}
|
|
|
|
enum ActionType {
|
|
removeItem,
|
|
removeCategory,
|
|
removeChapter,
|
|
removeHistory,
|
|
removeUpdate,
|
|
removeExtension,
|
|
removeTrack,
|
|
}
|