import 'package:isar/isar.dart'; part 'changed_items.g.dart'; @collection @Name("Changed Items") class ChangedItems { Id? id; List? deletedMangas; List? updatedChapters; List? deletedCategories; ChangedItems( {this.id = Isar.autoIncrement, this.deletedMangas = const [], this.updatedChapters = const [], this.deletedCategories = const []}); ChangedItems.fromJson(Map json) { id = json['id']; deletedMangas = json['deletedMangas']; updatedChapters = json['updatedChapters']; deletedCategories = json['deletedCategories']; } Map toJson() => { 'id': id, 'deletedMangas': deletedMangas, 'updatedChapters': updatedChapters, 'deletedCategories': deletedCategories }; } @embedded class DeletedManga { int? mangaId; DeletedManga({this.mangaId}); DeletedManga.fromJson(Map json) { mangaId = json['mangaId']; } Map toJson() => {'mangaId': mangaId}; } @embedded class UpdatedChapter { int? chapterId; int? mangaId; bool? isBookmarked; bool? isRead; String? lastPageRead; bool? deleted; UpdatedChapter({this.chapterId, this.mangaId, this.isBookmarked, this.isRead, this.lastPageRead, this.deleted}); UpdatedChapter.fromJson(Map json) { chapterId = json['chapterId']; mangaId = json['mangaId']; isBookmarked = json['isBookmarked']; isRead = json['isRead']; lastPageRead = json['lastPageRead']; deleted = json['deleted']; } Map toJson() => { 'chapterId': chapterId, 'mangaId': mangaId, 'isBookmarked': isBookmarked, 'isRead': isRead, 'lastPageRead': lastPageRead, 'deleted': deleted }; } @embedded class DeletedCategory { int? categoryId; DeletedCategory({this.categoryId}); DeletedCategory.fromJson(Map json) { categoryId = json['categoryId']; } Map toJson() => {'categoryId': categoryId}; }