> allOffsets,
+) {
+ final object = Track(
+ finishedReadingDate: reader.readLongOrNull(offsets[0]),
+ id: id,
+ lastChapterRead: reader.readLongOrNull(offsets[1]),
+ mangaId: reader.readLongOrNull(offsets[2]),
+ mediaId: reader.readLongOrNull(offsets[3]),
+ score: reader.readLongOrNull(offsets[4]),
+ startedReadingDate: reader.readLongOrNull(offsets[5]),
+ status: _TrackstatusValueEnumMap[reader.readByteOrNull(offsets[6])] ??
+ TrackStatus.reading,
+ syncId: reader.readLongOrNull(offsets[7]),
+ title: reader.readStringOrNull(offsets[8]),
+ totalChapter: reader.readLongOrNull(offsets[9]),
+ trackingUrl: reader.readStringOrNull(offsets[10]),
+ );
+ return object;
+}
+
+P _trackDeserializeProp(
+ IsarReader reader,
+ int propertyId,
+ int offset,
+ Map> allOffsets,
+) {
+ switch (propertyId) {
+ case 0:
+ return (reader.readLongOrNull(offset)) as P;
+ case 1:
+ return (reader.readLongOrNull(offset)) as P;
+ case 2:
+ return (reader.readLongOrNull(offset)) as P;
+ case 3:
+ return (reader.readLongOrNull(offset)) as P;
+ case 4:
+ return (reader.readLongOrNull(offset)) as P;
+ case 5:
+ return (reader.readLongOrNull(offset)) as P;
+ case 6:
+ return (_TrackstatusValueEnumMap[reader.readByteOrNull(offset)] ??
+ TrackStatus.reading) as P;
+ case 7:
+ return (reader.readLongOrNull(offset)) as P;
+ case 8:
+ return (reader.readStringOrNull(offset)) as P;
+ case 9:
+ return (reader.readLongOrNull(offset)) as P;
+ case 10:
+ return (reader.readStringOrNull(offset)) as P;
+ default:
+ throw IsarError('Unknown property with id $propertyId');
+ }
+}
+
+const _TrackstatusEnumValueMap = {
+ 'reading': 0,
+ 'completed': 1,
+ 'onHold': 2,
+ 'dropped': 3,
+ 'planToRead': 4,
+ 'rereading': 5,
+};
+const _TrackstatusValueEnumMap = {
+ 0: TrackStatus.reading,
+ 1: TrackStatus.completed,
+ 2: TrackStatus.onHold,
+ 3: TrackStatus.dropped,
+ 4: TrackStatus.planToRead,
+ 5: TrackStatus.rereading,
+};
+
+Id _trackGetId(Track object) {
+ return object.id ?? Isar.autoIncrement;
+}
+
+List> _trackGetLinks(Track object) {
+ return [];
+}
+
+void _trackAttach(IsarCollection col, Id id, Track object) {
+ object.id = id;
+}
+
+extension TrackQueryWhereSort on QueryBuilder