content: // GENERATED CODE - DO NOT MODIFY BY HAND
  
  part of 'chapter.dart';
  
  // **************************************************************************
  // IsarCollectionGenerator
  // **************************************************************************
  
  // coverage:ignore-file
  // ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
  
  extension GetChapterCollection on Isar {
    IsarCollection<Chapter> get chapters => this.collection();
  }
  
  const ChapterSchema = CollectionSchema(
    name: r'Chapter',
    id: -7604549436611156012,
    properties: {
      r'archivePath': PropertySchema(
        id: 0,
        name: r'archivePath',
        type: IsarType.string,
      ),
      r'dateUpload': PropertySchema(
        id: 1,
        name: r'dateUpload',
        type: IsarType.string,
      ),
      r'isBookmarked': PropertySchema(
        id: 2,
        name: r'isBookmarked',
        type: IsarType.bool,
      ),
      r'isRead': PropertySchema(
        id: 3,
        name: r'isRead',
        type: IsarType.bool,
      ),
      r'lastPageRead': PropertySchema(
        id: 4,
        name: r'lastPageRead',
        type: IsarType.string,
      ),
      r'mangaId': PropertySchema(
        id: 5,
        name: r'mangaId',
        type: IsarType.long,
      ),
      r'name': PropertySchema(
        id: 6,
        name: r'name',
        type: IsarType.string,
      ),
      r'scanlator': PropertySchema(
        id: 7,
        name: r'scanlator',
        type: IsarType.string,
      ),
      r'updatedAt': PropertySchema(
        id: 8,
        name: r'updatedAt',
        type: IsarType.long,
      ),
      r'url': PropertySchema(
        id: 9,
        name: r'url',
        type: IsarType.string,
      )
    },
    estimateSize: _chapterEstimateSize,
    serialize: _chapterSerialize,
    deserialize: _chapterDeserialize,
    deserializeProp: _chapterDeserializeProp,
    idName: r'id',
    indexes: {},
    links: {
      r'manga': LinkSchema(
        id: -8510956094935473973,
        name: r'manga',
        target: r'Manga',
        single: true,
      )
    },
    embeddedSchemas: {},
    getId: _chapterGetId,
    getLinks: _chapterGetLinks,
    attach: _chapterAttach,
    version: '3.1.0+1',
  );
  
  int _chapterEstimateSize(
    Chapter object,
    List<int> offsets,
    Map<Type, List<int>> allOffsets,
  ) {
    var bytesCount = offsets.last;
    {
      final value = object.archivePath;
      if (value != null) {
        bytesCount += 3 + value.length * 3;
      }
    }
    {
      final value = object.dateUpload;
      if (value != null) {
        bytesCount += 3 + value.length * 3;
      }
    }
    {
      final value = object.lastPageRead;
      if (value != null) {
        bytesCount += 3 + value.length * 3;
      }
    }
    {
      final value = object.name;
      if (value != null) {
        bytesCount += 3 + value.length * 3;
      }
    }
    {
      final value = object.scanlator;
      if (value != null) {
        bytesCount += 3 + value.length * 3;
      }
    }
    {
      final value = object.url;
      if (value != null) {
        bytesCount += 3 + value.length * 3;
      }
    }
    return bytesCount;
  }
  
  void _chapterSerialize(
    Chapter object,
    IsarWriter writer,
    List<int> offsets,
    Map<Type, List<int>> allOffsets,
  ) {
    writer.writeString(offsets[0], object.archivePath);
    writer.writeString(offsets[1], object.dateUpload);
    writer.writeBool(offsets[2], object.isBookmarked);
    writer.writeBool(offsets[3], object.isRead);
    writer.writeString(offsets[4], object.lastPageRead);
    writer.writeLong(offsets[5], object.mangaId);
    writer.writeString(offsets[6], object.name);
    writer.writeString(offsets[7], object.scanlator);
    writer.writeLong(offsets[8], object.updatedAt);
    writer.writeString(offsets[9], object.url);
  }
  
  Chapter _chapterDeserialize(
    Id id,
    IsarReader reader,
    List<int> offsets,
    Map<Type, List<int>> allOffsets,
  ) {
    final object = Chapter(
      archivePath: reader.readStringOrNull(offsets[0]),
      dateUpload: reader.readStringOrNull(offsets[1]),
      id: id,
      isBookmarked: reader.readBoolOrNull(offsets[2]),
      isRead: reader.readBoolOrNull(offsets[3]),
      lastPageRead: reader.readStringOrNull(offsets[4]),
      mangaId: reader.readLongOrNull(offsets[5]),
      name: reader.readStringOrNull(offsets[6]),
      scanlator: reader.readStringOrNull(offsets[7]),
      updatedAt: reader.readLongOrNull(offsets[8]),
      url: reader.readStringOrNull(offsets[9]),
    );
    return object;
  }
  
  P _chapterDeserializeProp<P>(
    IsarReader reader,
    int propertyId,
    int offset,
    Map<Type, List<int>> allOffsets,
  ) {
    switch (propertyId) {
      case 0:
        return (reader.readStringOrNull(offset)) as P;
      case 1:
        return (reader.readStringOrNull(offset)) as P;
      case 2:
        return (reader.readBoolOrNull(offset)) as P;
      case 3:
        return (reader.readBoolOrNull(offset)) as P;
      case 4:
        return (reader.readStringOrNull(offset)) as P;
      case 5:
        return (reader.readLongOrNull(offset)) as P;
      case 6:
        return (reader.readStringOrNull(offset)) as P;
      case 7:
        return (reader.readStringOrNull(offset)) as P;
      case 8:
        return (reader.readLongOrNull(offset)) as P;
      case 9:
        return (reader.readStringOrNull(offset)) as P;
      default:
        throw IsarError('Unknown property with id $propertyId');
    }
  }
  
  Id _chapterGetId(Chapter object) {
    return object.id ?? Isar.autoIncrement;
  }
  
  List<IsarLinkBase<dynamic>> _chapterGetLinks(Chapter object) {
    return [object.manga];
  }
  
  void _chapterAttach(IsarCollection<dynamic> col, Id id, Chapter object) {
    object.id = id;
    object.manga.attach(col, col.isar.collection<Manga>(), r'manga', id);
  }
  
  extension ChapterQueryWhereSort on QueryBuilder<Chapter, Chapter, QWhere> {
    QueryBuilder<Chapter, Chapter, QAfterWhere> anyId() {
      return QueryBuilder.apply(this, (query) {
        return query.addWhereClause(const IdWhereClause.any());
      });
    }
  }
  
  extension ChapterQueryWhere on QueryBuilder<Chapter, Chapter, QWhereClause> {
    QueryBuilder<Chapter, Chapter, QAfterWhereClause> idEqualTo(Id id) {
      return QueryBuilder.apply(this, (query) {
        return query.addWhereClause(IdWhereClause.between(
          lower: id,
          upper: id,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterWhereClause> idNotEqualTo(Id id) {
      return QueryBuilder.apply(this, (query) {
        if (query.whereSort == Sort.asc) {
          return query
              .addWhereClause(
                IdWhereClause.lessThan(upper: id, includeUpper: false),
              )
              .addWhereClause(
                IdWhereClause.greaterThan(lower: id, includeLower: false),
              );
        } else {
          return query
              .addWhereClause(
                IdWhereClause.greaterThan(lower: id, includeLower: false),
              )
              .addWhereClause(
                IdWhereClause.lessThan(upper: id, includeUpper: false),
              );
        }
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterWhereClause> idGreaterThan(Id id,
        {bool include = false}) {
      return QueryBuilder.apply(this, (query) {
        return query.addWhereClause(
          IdWhereClause.greaterThan(lower: id, includeLower: include),
        );
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterWhereClause> idLessThan(Id id,
        {bool include = false}) {
      return QueryBuilder.apply(this, (query) {
        return query.addWhereClause(
          IdWhereClause.lessThan(upper: id, includeUpper: include),
        );
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterWhereClause> idBetween(
      Id lowerId,
      Id upperId, {
      bool includeLower = true,
      bool includeUpper = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addWhereClause(IdWhereClause.between(
          lower: lowerId,
          includeLower: includeLower,
          upper: upperId,
          includeUpper: includeUpper,
        ));
      });
    }
  }
  
  extension ChapterQueryFilter
      on QueryBuilder<Chapter, Chapter, QFilterCondition> {
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'archivePath',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'archivePath',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathEqualTo(
      String? value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'archivePath',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathGreaterThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          include: include,
          property: r'archivePath',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathLessThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.lessThan(
          include: include,
          property: r'archivePath',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathBetween(
      String? lower,
      String? upper, {
      bool includeLower = true,
      bool includeUpper = true,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.between(
          property: r'archivePath',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathStartsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.startsWith(
          property: r'archivePath',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathEndsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.endsWith(
          property: r'archivePath',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathContains(
        String value,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.contains(
          property: r'archivePath',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathMatches(
        String pattern,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.matches(
          property: r'archivePath',
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> archivePathIsEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'archivePath',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition>
        archivePathIsNotEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          property: r'archivePath',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'dateUpload',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'dateUpload',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadEqualTo(
      String? value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'dateUpload',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadGreaterThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          include: include,
          property: r'dateUpload',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadLessThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.lessThan(
          include: include,
          property: r'dateUpload',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadBetween(
      String? lower,
      String? upper, {
      bool includeLower = true,
      bool includeUpper = true,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.between(
          property: r'dateUpload',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadStartsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.startsWith(
          property: r'dateUpload',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadEndsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.endsWith(
          property: r'dateUpload',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadContains(
        String value,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.contains(
          property: r'dateUpload',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadMatches(
        String pattern,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.matches(
          property: r'dateUpload',
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadIsEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'dateUpload',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> dateUploadIsNotEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          property: r'dateUpload',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> idIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'id',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> idIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'id',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> idEqualTo(Id? value) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'id',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> idGreaterThan(
      Id? value, {
      bool include = false,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          include: include,
          property: r'id',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> idLessThan(
      Id? value, {
      bool include = false,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.lessThan(
          include: include,
          property: r'id',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> idBetween(
      Id? lower,
      Id? upper, {
      bool includeLower = true,
      bool includeUpper = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.between(
          property: r'id',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> isBookmarkedIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'isBookmarked',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition>
        isBookmarkedIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'isBookmarked',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> isBookmarkedEqualTo(
        bool? value) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'isBookmarked',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> isReadIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'isRead',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> isReadIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'isRead',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> isReadEqualTo(
        bool? value) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'isRead',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'lastPageRead',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition>
        lastPageReadIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'lastPageRead',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadEqualTo(
      String? value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'lastPageRead',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadGreaterThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          include: include,
          property: r'lastPageRead',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadLessThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.lessThan(
          include: include,
          property: r'lastPageRead',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadBetween(
      String? lower,
      String? upper, {
      bool includeLower = true,
      bool includeUpper = true,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.between(
          property: r'lastPageRead',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadStartsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.startsWith(
          property: r'lastPageRead',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadEndsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.endsWith(
          property: r'lastPageRead',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadContains(
        String value,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.contains(
          property: r'lastPageRead',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadMatches(
        String pattern,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.matches(
          property: r'lastPageRead',
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> lastPageReadIsEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'lastPageRead',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition>
        lastPageReadIsNotEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          property: r'lastPageRead',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> mangaIdIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'mangaId',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> mangaIdIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'mangaId',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> mangaIdEqualTo(
        int? value) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'mangaId',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> mangaIdGreaterThan(
      int? value, {
      bool include = false,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          include: include,
          property: r'mangaId',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> mangaIdLessThan(
      int? value, {
      bool include = false,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.lessThan(
          include: include,
          property: r'mangaId',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> mangaIdBetween(
      int? lower,
      int? upper, {
      bool includeLower = true,
      bool includeUpper = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.between(
          property: r'mangaId',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'name',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'name',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameEqualTo(
      String? value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'name',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameGreaterThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          include: include,
          property: r'name',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameLessThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.lessThan(
          include: include,
          property: r'name',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameBetween(
      String? lower,
      String? upper, {
      bool includeLower = true,
      bool includeUpper = true,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.between(
          property: r'name',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameStartsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.startsWith(
          property: r'name',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameEndsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.endsWith(
          property: r'name',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameContains(
        String value,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.contains(
          property: r'name',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameMatches(
        String pattern,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.matches(
          property: r'name',
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameIsEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'name',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> nameIsNotEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          property: r'name',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'scanlator',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'scanlator',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorEqualTo(
      String? value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'scanlator',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorGreaterThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          include: include,
          property: r'scanlator',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorLessThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.lessThan(
          include: include,
          property: r'scanlator',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorBetween(
      String? lower,
      String? upper, {
      bool includeLower = true,
      bool includeUpper = true,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.between(
          property: r'scanlator',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorStartsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.startsWith(
          property: r'scanlator',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorEndsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.endsWith(
          property: r'scanlator',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorContains(
        String value,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.contains(
          property: r'scanlator',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorMatches(
        String pattern,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.matches(
          property: r'scanlator',
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorIsEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'scanlator',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> scanlatorIsNotEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          property: r'scanlator',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> updatedAtIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'updatedAt',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> updatedAtIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'updatedAt',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> updatedAtEqualTo(
        int? value) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'updatedAt',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> updatedAtGreaterThan(
      int? value, {
      bool include = false,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          include: include,
          property: r'updatedAt',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> updatedAtLessThan(
      int? value, {
      bool include = false,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.lessThan(
          include: include,
          property: r'updatedAt',
          value: value,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> updatedAtBetween(
      int? lower,
      int? upper, {
      bool includeLower = true,
      bool includeUpper = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.between(
          property: r'updatedAt',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNull(
          property: r'url',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlIsNotNull() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(const FilterCondition.isNotNull(
          property: r'url',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlEqualTo(
      String? value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'url',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlGreaterThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          include: include,
          property: r'url',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlLessThan(
      String? value, {
      bool include = false,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.lessThan(
          include: include,
          property: r'url',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlBetween(
      String? lower,
      String? upper, {
      bool includeLower = true,
      bool includeUpper = true,
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.between(
          property: r'url',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlStartsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.startsWith(
          property: r'url',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlEndsWith(
      String value, {
      bool caseSensitive = true,
    }) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.endsWith(
          property: r'url',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlContains(
        String value,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.contains(
          property: r'url',
          value: value,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlMatches(
        String pattern,
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.matches(
          property: r'url',
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlIsEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.equalTo(
          property: r'url',
          value: '',
        ));
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> urlIsNotEmpty() {
      return QueryBuilder.apply(this, (query) {
        return query.addFilterCondition(FilterCondition.greaterThan(
          property: r'url',
          value: '',
        ));
      });
    }
  }
  
  extension ChapterQueryObject
      on QueryBuilder<Chapter, Chapter, QFilterCondition> {}
  
  extension ChapterQueryLinks
      on QueryBuilder<Chapter, Chapter, QFilterCondition> {
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> manga(
        FilterQuery<Manga> q) {
      return QueryBuilder.apply(this, (query) {
        return query.link(q, r'manga');
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterFilterCondition> mangaIsNull() {
      return QueryBuilder.apply(this, (query) {
        return query.linkLength(r'manga', 0, true, 0, true);
      });
    }
  }
  
  extension ChapterQuerySortBy on QueryBuilder<Chapter, Chapter, QSortBy> {
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByArchivePath() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'archivePath', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByArchivePathDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'archivePath', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByDateUpload() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'dateUpload', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByDateUploadDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'dateUpload', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByIsBookmarked() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'isBookmarked', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByIsBookmarkedDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'isBookmarked', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByIsRead() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'isRead', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByIsReadDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'isRead', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByLastPageRead() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'lastPageRead', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByLastPageReadDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'lastPageRead', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByMangaId() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'mangaId', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByMangaIdDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'mangaId', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByName() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'name', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByNameDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'name', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByScanlator() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'scanlator', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByScanlatorDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'scanlator', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByUpdatedAt() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'updatedAt', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByUpdatedAtDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'updatedAt', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByUrl() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'url', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> sortByUrlDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'url', Sort.desc);
      });
    }
  }
  
  extension ChapterQuerySortThenBy
      on QueryBuilder<Chapter, Chapter, QSortThenBy> {
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByArchivePath() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'archivePath', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByArchivePathDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'archivePath', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByDateUpload() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'dateUpload', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByDateUploadDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'dateUpload', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenById() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'id', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByIdDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'id', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByIsBookmarked() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'isBookmarked', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByIsBookmarkedDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'isBookmarked', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByIsRead() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'isRead', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByIsReadDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'isRead', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByLastPageRead() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'lastPageRead', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByLastPageReadDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'lastPageRead', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByMangaId() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'mangaId', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByMangaIdDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'mangaId', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByName() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'name', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByNameDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'name', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByScanlator() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'scanlator', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByScanlatorDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'scanlator', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByUpdatedAt() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'updatedAt', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByUpdatedAtDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'updatedAt', Sort.desc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByUrl() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'url', Sort.asc);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QAfterSortBy> thenByUrlDesc() {
      return QueryBuilder.apply(this, (query) {
        return query.addSortBy(r'url', Sort.desc);
      });
    }
  }
  
  extension ChapterQueryWhereDistinct
      on QueryBuilder<Chapter, Chapter, QDistinct> {
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByArchivePath(
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'archivePath', caseSensitive: caseSensitive);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByDateUpload(
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'dateUpload', caseSensitive: caseSensitive);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByIsBookmarked() {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'isBookmarked');
      });
    }
  
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByIsRead() {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'isRead');
      });
    }
  
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByLastPageRead(
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'lastPageRead', caseSensitive: caseSensitive);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByMangaId() {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'mangaId');
      });
    }
  
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByName(
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'name', caseSensitive: caseSensitive);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByScanlator(
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'scanlator', caseSensitive: caseSensitive);
      });
    }
  
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByUpdatedAt() {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'updatedAt');
      });
    }
  
    QueryBuilder<Chapter, Chapter, QDistinct> distinctByUrl(
        {bool caseSensitive = true}) {
      return QueryBuilder.apply(this, (query) {
        return query.addDistinctBy(r'url', caseSensitive: caseSensitive);
      });
    }
  }
  
  extension ChapterQueryProperty
      on QueryBuilder<Chapter, Chapter, QQueryProperty> {
    QueryBuilder<Chapter, int, QQueryOperations> idProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'id');
      });
    }
  
    QueryBuilder<Chapter, String?, QQueryOperations> archivePathProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'archivePath');
      });
    }
  
    QueryBuilder<Chapter, String?, QQueryOperations> dateUploadProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'dateUpload');
      });
    }
  
    QueryBuilder<Chapter, bool?, QQueryOperations> isBookmarkedProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'isBookmarked');
      });
    }
  
    QueryBuilder<Chapter, bool?, QQueryOperations> isReadProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'isRead');
      });
    }
  
    QueryBuilder<Chapter, String?, QQueryOperations> lastPageReadProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'lastPageRead');
      });
    }
  
    QueryBuilder<Chapter, int?, QQueryOperations> mangaIdProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'mangaId');
      });
    }
  
    QueryBuilder<Chapter, String?, QQueryOperations> nameProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'name');
      });
    }
  
    QueryBuilder<Chapter, String?, QQueryOperations> scanlatorProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'scanlator');
      });
    }
  
    QueryBuilder<Chapter, int?, QQueryOperations> updatedAtProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'updatedAt');
      });
    }
  
    QueryBuilder<Chapter, String?, QQueryOperations> urlProperty() {
      return QueryBuilder.apply(this, (query) {
        return query.addPropertyName(r'url');
      });
    }
  }
  