// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'measure_general.dart';

// **************************************************************************
// _IsarCollectionGenerator
// **************************************************************************

// coverage:ignore-file
// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors
// ignore_for_file: type=lint

extension GetMeasureGeneralCollection on Isar {
  IsarCollection<int, MeasureGeneral> get measureGenerals => this.collection();
}

const MeasureGeneralSchema = IsarGeneratedSchema(
  schema: IsarSchema(
    name: 'MeasureGeneral',
    idName: 'id',
    embedded: false,
    properties: [
      IsarPropertySchema(
        name: 'name',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'measureType',
        type: IsarType.objectList,
        target: 'IdValue',
      ),
      IsarPropertySchema(
        name: 'measureGroup',
        type: IsarType.objectList,
        target: 'IdValueMix',
      ),
      IsarPropertySchema(
        name: 'bioDivScore',
        type: IsarType.long,
      ),
      IsarPropertySchema(
        name: 'producerOrProvider',
        type: IsarType.objectList,
        target: 'IdValue',
      ),
      IsarPropertySchema(
        name: 'files',
        type: IsarType.objectList,
        target: 'FilePart',
      ),
      IsarPropertySchema(
        name: 'region',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'applyTimeFrame',
        type: IsarType.objectList,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'organisms',
        type: IsarType.objectList,
        target: 'IdValue',
      ),
      IsarPropertySchema(
        name: 'baseUnit',
        type: IsarType.object,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'baseUnitPrice',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'effort',
        type: IsarType.object,
        target: 'IdValueColor',
      ),
      IsarPropertySchema(
        name: 'remarks',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'composition',
        type: IsarType.string,
      ),
      IsarPropertySchema(
        name: 'resources',
        type: IsarType.objectList,
        target: 'FilePart',
      ),
    ],
    indexes: [
      IsarIndexSchema(
        name: 'name',
        properties: [
          "name",
        ],
        unique: false,
        hash: false,
      ),
    ],
  ),
  converter: IsarObjectConverter<int, MeasureGeneral>(
    serialize: serializeMeasureGeneral,
    deserialize: deserializeMeasureGeneral,
    deserializeProperty: deserializeMeasureGeneralProp,
  ),
  embeddedSchemas: [
    IdValueSchema,
    IdValueMixSchema,
    IdValueColorSchema,
    FilePartSchema,
    ThumbnailsSchema,
    ThumbnailSchema
  ],
);

@isarProtected
int serializeMeasureGeneral(IsarWriter writer, MeasureGeneral object) {
  {
    final value = object.name;
    if (value == null) {
      IsarCore.writeNull(writer, 1);
    } else {
      IsarCore.writeString(writer, 1, value);
    }
  }
  {
    final list = object.measureType;
    if (list == null) {
      IsarCore.writeNull(writer, 2);
    } else {
      final listWriter = IsarCore.beginList(writer, 2, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValue(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.measureGroup;
    if (list == null) {
      IsarCore.writeNull(writer, 3);
    } else {
      final listWriter = IsarCore.beginList(writer, 3, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueMix(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  IsarCore.writeLong(writer, 4, object.bioDivScore ?? -9223372036854775808);
  {
    final list = object.producerOrProvider;
    if (list == null) {
      IsarCore.writeNull(writer, 5);
    } else {
      final listWriter = IsarCore.beginList(writer, 5, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValue(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.files;
    if (list == null) {
      IsarCore.writeNull(writer, 6);
    } else {
      final listWriter = IsarCore.beginList(writer, 6, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeFilePart(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.region;
    if (list == null) {
      IsarCore.writeNull(writer, 7);
    } else {
      final listWriter = IsarCore.beginList(writer, 7, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueColor(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.applyTimeFrame;
    if (list == null) {
      IsarCore.writeNull(writer, 8);
    } else {
      final listWriter = IsarCore.beginList(writer, 8, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValueColor(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final list = object.organisms;
    if (list == null) {
      IsarCore.writeNull(writer, 9);
    } else {
      final listWriter = IsarCore.beginList(writer, 9, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeIdValue(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  {
    final value = object.baseUnit;
    if (value == null) {
      IsarCore.writeNull(writer, 10);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 10);
      serializeIdValueColor(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  {
    final value = object.baseUnitPrice;
    if (value == null) {
      IsarCore.writeNull(writer, 11);
    } else {
      IsarCore.writeString(writer, 11, value);
    }
  }
  {
    final value = object.effort;
    if (value == null) {
      IsarCore.writeNull(writer, 12);
    } else {
      final objectWriter = IsarCore.beginObject(writer, 12);
      serializeIdValueColor(objectWriter, value);
      IsarCore.endObject(writer, objectWriter);
    }
  }
  {
    final value = object.remarks;
    if (value == null) {
      IsarCore.writeNull(writer, 13);
    } else {
      IsarCore.writeString(writer, 13, value);
    }
  }
  {
    final value = object.composition;
    if (value == null) {
      IsarCore.writeNull(writer, 14);
    } else {
      IsarCore.writeString(writer, 14, value);
    }
  }
  {
    final list = object.resources;
    if (list == null) {
      IsarCore.writeNull(writer, 15);
    } else {
      final listWriter = IsarCore.beginList(writer, 15, list.length);
      for (var i = 0; i < list.length; i++) {
        {
          final value = list[i];
          final objectWriter = IsarCore.beginObject(listWriter, i);
          serializeFilePart(objectWriter, value);
          IsarCore.endObject(listWriter, objectWriter);
        }
      }
      IsarCore.endList(writer, listWriter);
    }
  }
  return object.id;
}

@isarProtected
MeasureGeneral deserializeMeasureGeneral(IsarReader reader) {
  final object = MeasureGeneral();
  object.name = IsarCore.readString(reader, 1);
  {
    final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.measureType = null;
      } else {
        final list = List<IdValue>.filled(length, IdValue(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValue();
            } else {
              final embedded = deserializeIdValue(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.measureType = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.measureGroup = null;
      } else {
        final list =
            List<IdValueMix>.filled(length, IdValueMix(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueMix();
            } else {
              final embedded = deserializeIdValueMix(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.measureGroup = list;
      }
    }
  }
  {
    final value = IsarCore.readLong(reader, 4);
    if (value == -9223372036854775808) {
      object.bioDivScore = null;
    } else {
      object.bioDivScore = value;
    }
  }
  {
    final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.producerOrProvider = null;
      } else {
        final list = List<IdValue>.filled(length, IdValue(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValue();
            } else {
              final embedded = deserializeIdValue(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.producerOrProvider = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.files = null;
      } else {
        final list = List<FilePart>.filled(length, FilePart(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = FilePart();
            } else {
              final embedded = deserializeFilePart(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.files = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.region = null;
      } else {
        final list =
            List<IdValueColor>.filled(length, IdValueColor(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueColor();
            } else {
              final embedded = deserializeIdValueColor(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.region = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 8, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.applyTimeFrame = null;
      } else {
        final list =
            List<IdValueColor>.filled(length, IdValueColor(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValueColor();
            } else {
              final embedded = deserializeIdValueColor(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.applyTimeFrame = list;
      }
    }
  }
  {
    final length = IsarCore.readList(reader, 9, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.organisms = null;
      } else {
        final list = List<IdValue>.filled(length, IdValue(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = IdValue();
            } else {
              final embedded = deserializeIdValue(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.organisms = list;
      }
    }
  }
  {
    final objectReader = IsarCore.readObject(reader, 10);
    if (objectReader.isNull) {
      object.baseUnit = null;
    } else {
      final embedded = deserializeIdValueColor(objectReader);
      IsarCore.freeReader(objectReader);
      object.baseUnit = embedded;
    }
  }
  object.baseUnitPrice = IsarCore.readString(reader, 11);
  {
    final objectReader = IsarCore.readObject(reader, 12);
    if (objectReader.isNull) {
      object.effort = null;
    } else {
      final embedded = deserializeIdValueColor(objectReader);
      IsarCore.freeReader(objectReader);
      object.effort = embedded;
    }
  }
  object.remarks = IsarCore.readString(reader, 13);
  object.composition = IsarCore.readString(reader, 14);
  {
    final length = IsarCore.readList(reader, 15, IsarCore.readerPtrPtr);
    {
      final reader = IsarCore.readerPtr;
      if (reader.isNull) {
        object.resources = null;
      } else {
        final list = List<FilePart>.filled(length, FilePart(), growable: true);
        for (var i = 0; i < length; i++) {
          {
            final objectReader = IsarCore.readObject(reader, i);
            if (objectReader.isNull) {
              list[i] = FilePart();
            } else {
              final embedded = deserializeFilePart(objectReader);
              IsarCore.freeReader(objectReader);
              list[i] = embedded;
            }
          }
        }
        IsarCore.freeReader(reader);
        object.resources = list;
      }
    }
  }
  object.id = IsarCore.readId(reader);
  return object;
}

@isarProtected
dynamic deserializeMeasureGeneralProp(IsarReader reader, int property) {
  switch (property) {
    case 1:
      return IsarCore.readString(reader, 1);
    case 2:
      {
        final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list =
                List<IdValue>.filled(length, IdValue(), growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValue();
                } else {
                  final embedded = deserializeIdValue(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 3:
      {
        final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list =
                List<IdValueMix>.filled(length, IdValueMix(), growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueMix();
                } else {
                  final embedded = deserializeIdValueMix(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 4:
      {
        final value = IsarCore.readLong(reader, 4);
        if (value == -9223372036854775808) {
          return null;
        } else {
          return value;
        }
      }
    case 5:
      {
        final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list =
                List<IdValue>.filled(length, IdValue(), growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValue();
                } else {
                  final embedded = deserializeIdValue(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 6:
      {
        final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list =
                List<FilePart>.filled(length, FilePart(), growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = FilePart();
                } else {
                  final embedded = deserializeFilePart(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 7:
      {
        final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list = List<IdValueColor>.filled(length, IdValueColor(),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueColor();
                } else {
                  final embedded = deserializeIdValueColor(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 8:
      {
        final length = IsarCore.readList(reader, 8, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list = List<IdValueColor>.filled(length, IdValueColor(),
                growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValueColor();
                } else {
                  final embedded = deserializeIdValueColor(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 9:
      {
        final length = IsarCore.readList(reader, 9, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list =
                List<IdValue>.filled(length, IdValue(), growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = IdValue();
                } else {
                  final embedded = deserializeIdValue(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 10:
      {
        final objectReader = IsarCore.readObject(reader, 10);
        if (objectReader.isNull) {
          return null;
        } else {
          final embedded = deserializeIdValueColor(objectReader);
          IsarCore.freeReader(objectReader);
          return embedded;
        }
      }
    case 11:
      return IsarCore.readString(reader, 11);
    case 12:
      {
        final objectReader = IsarCore.readObject(reader, 12);
        if (objectReader.isNull) {
          return null;
        } else {
          final embedded = deserializeIdValueColor(objectReader);
          IsarCore.freeReader(objectReader);
          return embedded;
        }
      }
    case 13:
      return IsarCore.readString(reader, 13);
    case 14:
      return IsarCore.readString(reader, 14);
    case 15:
      {
        final length = IsarCore.readList(reader, 15, IsarCore.readerPtrPtr);
        {
          final reader = IsarCore.readerPtr;
          if (reader.isNull) {
            return null;
          } else {
            final list =
                List<FilePart>.filled(length, FilePart(), growable: true);
            for (var i = 0; i < length; i++) {
              {
                final objectReader = IsarCore.readObject(reader, i);
                if (objectReader.isNull) {
                  list[i] = FilePart();
                } else {
                  final embedded = deserializeFilePart(objectReader);
                  IsarCore.freeReader(objectReader);
                  list[i] = embedded;
                }
              }
            }
            IsarCore.freeReader(reader);
            return list;
          }
        }
      }
    case 0:
      return IsarCore.readId(reader);
    default:
      throw ArgumentError('Unknown property: $property');
  }
}

sealed class _MeasureGeneralUpdate {
  bool call({
    required int id,
    String? name,
    int? bioDivScore,
    String? baseUnitPrice,
    String? remarks,
    String? composition,
  });
}

class _MeasureGeneralUpdateImpl implements _MeasureGeneralUpdate {
  const _MeasureGeneralUpdateImpl(this.collection);

  final IsarCollection<int, MeasureGeneral> collection;

  @override
  bool call({
    required int id,
    Object? name = ignore,
    Object? bioDivScore = ignore,
    Object? baseUnitPrice = ignore,
    Object? remarks = ignore,
    Object? composition = ignore,
  }) {
    return collection.updateProperties([
          id
        ], {
          if (name != ignore) 1: name as String?,
          if (bioDivScore != ignore) 4: bioDivScore as int?,
          if (baseUnitPrice != ignore) 11: baseUnitPrice as String?,
          if (remarks != ignore) 13: remarks as String?,
          if (composition != ignore) 14: composition as String?,
        }) >
        0;
  }
}

sealed class _MeasureGeneralUpdateAll {
  int call({
    required List<int> id,
    String? name,
    int? bioDivScore,
    String? baseUnitPrice,
    String? remarks,
    String? composition,
  });
}

class _MeasureGeneralUpdateAllImpl implements _MeasureGeneralUpdateAll {
  const _MeasureGeneralUpdateAllImpl(this.collection);

  final IsarCollection<int, MeasureGeneral> collection;

  @override
  int call({
    required List<int> id,
    Object? name = ignore,
    Object? bioDivScore = ignore,
    Object? baseUnitPrice = ignore,
    Object? remarks = ignore,
    Object? composition = ignore,
  }) {
    return collection.updateProperties(id, {
      if (name != ignore) 1: name as String?,
      if (bioDivScore != ignore) 4: bioDivScore as int?,
      if (baseUnitPrice != ignore) 11: baseUnitPrice as String?,
      if (remarks != ignore) 13: remarks as String?,
      if (composition != ignore) 14: composition as String?,
    });
  }
}

extension MeasureGeneralUpdate on IsarCollection<int, MeasureGeneral> {
  _MeasureGeneralUpdate get update => _MeasureGeneralUpdateImpl(this);

  _MeasureGeneralUpdateAll get updateAll => _MeasureGeneralUpdateAllImpl(this);
}

sealed class _MeasureGeneralQueryUpdate {
  int call({
    String? name,
    int? bioDivScore,
    String? baseUnitPrice,
    String? remarks,
    String? composition,
  });
}

class _MeasureGeneralQueryUpdateImpl implements _MeasureGeneralQueryUpdate {
  const _MeasureGeneralQueryUpdateImpl(this.query, {this.limit});

  final IsarQuery<MeasureGeneral> query;
  final int? limit;

  @override
  int call({
    Object? name = ignore,
    Object? bioDivScore = ignore,
    Object? baseUnitPrice = ignore,
    Object? remarks = ignore,
    Object? composition = ignore,
  }) {
    return query.updateProperties(limit: limit, {
      if (name != ignore) 1: name as String?,
      if (bioDivScore != ignore) 4: bioDivScore as int?,
      if (baseUnitPrice != ignore) 11: baseUnitPrice as String?,
      if (remarks != ignore) 13: remarks as String?,
      if (composition != ignore) 14: composition as String?,
    });
  }
}

extension MeasureGeneralQueryUpdate on IsarQuery<MeasureGeneral> {
  _MeasureGeneralQueryUpdate get updateFirst =>
      _MeasureGeneralQueryUpdateImpl(this, limit: 1);

  _MeasureGeneralQueryUpdate get updateAll =>
      _MeasureGeneralQueryUpdateImpl(this);
}

class _MeasureGeneralQueryBuilderUpdateImpl
    implements _MeasureGeneralQueryUpdate {
  const _MeasureGeneralQueryBuilderUpdateImpl(this.query, {this.limit});

  final QueryBuilder<MeasureGeneral, MeasureGeneral, QOperations> query;
  final int? limit;

  @override
  int call({
    Object? name = ignore,
    Object? bioDivScore = ignore,
    Object? baseUnitPrice = ignore,
    Object? remarks = ignore,
    Object? composition = ignore,
  }) {
    final q = query.build();
    try {
      return q.updateProperties(limit: limit, {
        if (name != ignore) 1: name as String?,
        if (bioDivScore != ignore) 4: bioDivScore as int?,
        if (baseUnitPrice != ignore) 11: baseUnitPrice as String?,
        if (remarks != ignore) 13: remarks as String?,
        if (composition != ignore) 14: composition as String?,
      });
    } finally {
      q.close();
    }
  }
}

extension MeasureGeneralQueryBuilderUpdate
    on QueryBuilder<MeasureGeneral, MeasureGeneral, QOperations> {
  _MeasureGeneralQueryUpdate get updateFirst =>
      _MeasureGeneralQueryBuilderUpdateImpl(this, limit: 1);

  _MeasureGeneralQueryUpdate get updateAll =>
      _MeasureGeneralQueryBuilderUpdateImpl(this);
}

extension MeasureGeneralQueryFilter
    on QueryBuilder<MeasureGeneral, MeasureGeneral, QFilterCondition> {
  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 1));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 1));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 1,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameGreaterThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterCondition(
          property: 1,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameGreaterThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterOrEqualCondition(
          property: 1,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameLessThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessCondition(
          property: 1,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameLessThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessOrEqualCondition(
          property: 1,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameBetween(
    String? lower,
    String? upper, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        BetweenCondition(
          property: 1,
          lower: lower,
          upper: upper,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameStartsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        StartsWithCondition(
          property: 1,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameEndsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EndsWithCondition(
          property: 1,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameContains(String value, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        ContainsCondition(
          property: 1,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameMatches(String pattern, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        MatchesCondition(
          property: 1,
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 1,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      nameIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 1,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      measureTypeIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 2));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      measureTypeIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 2));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      measureTypeIsEmpty() {
    return not().group(
      (q) => q.measureTypeIsNull().or().measureTypeIsNotEmpty(),
    );
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      measureTypeIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 2, value: null),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      measureGroupIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 3));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      measureGroupIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 3));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      measureGroupIsEmpty() {
    return not().group(
      (q) => q.measureGroupIsNull().or().measureGroupIsNotEmpty(),
    );
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      measureGroupIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 3, value: null),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      bioDivScoreIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 4));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      bioDivScoreIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 4));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      bioDivScoreEqualTo(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 4,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      bioDivScoreGreaterThan(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterCondition(
          property: 4,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      bioDivScoreGreaterThanOrEqualTo(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterOrEqualCondition(
          property: 4,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      bioDivScoreLessThan(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessCondition(
          property: 4,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      bioDivScoreLessThanOrEqualTo(
    int? value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessOrEqualCondition(
          property: 4,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      bioDivScoreBetween(
    int? lower,
    int? upper,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        BetweenCondition(
          property: 4,
          lower: lower,
          upper: upper,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      producerOrProviderIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 5));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      producerOrProviderIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 5));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      producerOrProviderIsEmpty() {
    return not().group(
      (q) => q.producerOrProviderIsNull().or().producerOrProviderIsNotEmpty(),
    );
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      producerOrProviderIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 5, value: null),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      filesIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 6));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      filesIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 6));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      filesIsEmpty() {
    return not().group(
      (q) => q.filesIsNull().or().filesIsNotEmpty(),
    );
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      filesIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 6, value: null),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      regionIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 7));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      regionIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 7));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      regionIsEmpty() {
    return not().group(
      (q) => q.regionIsNull().or().regionIsNotEmpty(),
    );
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      regionIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 7, value: null),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      applyTimeFrameIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 8));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      applyTimeFrameIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 8));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      applyTimeFrameIsEmpty() {
    return not().group(
      (q) => q.applyTimeFrameIsNull().or().applyTimeFrameIsNotEmpty(),
    );
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      applyTimeFrameIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 8, value: null),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      organismsIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 9));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      organismsIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 9));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      organismsIsEmpty() {
    return not().group(
      (q) => q.organismsIsNull().or().organismsIsNotEmpty(),
    );
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      organismsIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 9, value: null),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 10));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 10));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 11));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 11));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 11,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceGreaterThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterCondition(
          property: 11,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceGreaterThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterOrEqualCondition(
          property: 11,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceLessThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessCondition(
          property: 11,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceLessThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessOrEqualCondition(
          property: 11,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceBetween(
    String? lower,
    String? upper, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        BetweenCondition(
          property: 11,
          lower: lower,
          upper: upper,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceStartsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        StartsWithCondition(
          property: 11,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceEndsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EndsWithCondition(
          property: 11,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceContains(String value, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        ContainsCondition(
          property: 11,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceMatches(String pattern, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        MatchesCondition(
          property: 11,
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 11,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      baseUnitPriceIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 11,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      effortIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 12));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      effortIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 12));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 13));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 13));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 13,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksGreaterThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterCondition(
          property: 13,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksGreaterThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterOrEqualCondition(
          property: 13,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksLessThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessCondition(
          property: 13,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksLessThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessOrEqualCondition(
          property: 13,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksBetween(
    String? lower,
    String? upper, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        BetweenCondition(
          property: 13,
          lower: lower,
          upper: upper,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksStartsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        StartsWithCondition(
          property: 13,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksEndsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EndsWithCondition(
          property: 13,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksContains(String value, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        ContainsCondition(
          property: 13,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksMatches(String pattern, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        MatchesCondition(
          property: 13,
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 13,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      remarksIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 13,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 14));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 14));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionGreaterThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionGreaterThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterOrEqualCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionLessThan(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionLessThanOrEqualTo(
    String? value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessOrEqualCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionBetween(
    String? lower,
    String? upper, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        BetweenCondition(
          property: 14,
          lower: lower,
          upper: upper,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionStartsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        StartsWithCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionEndsWith(
    String value, {
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EndsWithCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionContains(String value, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        ContainsCondition(
          property: 14,
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionMatches(String pattern, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        MatchesCondition(
          property: 14,
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const EqualCondition(
          property: 14,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      compositionIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterCondition(
          property: 14,
          value: '',
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      resourcesIsNull() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(const IsNullCondition(property: 15));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      resourcesIsNotNull() {
    return QueryBuilder.apply(not(), (query) {
      return query.addFilterCondition(const IsNullCondition(property: 15));
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      resourcesIsEmpty() {
    return not().group(
      (q) => q.resourcesIsNull().or().resourcesIsNotEmpty(),
    );
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      resourcesIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        const GreaterOrEqualCondition(property: 15, value: null),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition> idEqualTo(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        EqualCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      idGreaterThan(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      idGreaterThanOrEqualTo(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        GreaterOrEqualCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      idLessThan(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition>
      idLessThanOrEqualTo(
    int value,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        LessOrEqualCondition(
          property: 0,
          value: value,
        ),
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition> idBetween(
    int lower,
    int upper,
  ) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        BetweenCondition(
          property: 0,
          lower: lower,
          upper: upper,
        ),
      );
    });
  }
}

extension MeasureGeneralQueryObject
    on QueryBuilder<MeasureGeneral, MeasureGeneral, QFilterCondition> {
  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition> baseUnit(
      FilterQuery<IdValueColor> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 10);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterFilterCondition> effort(
      FilterQuery<IdValueColor> q) {
    return QueryBuilder.apply(this, (query) {
      return query.object(q, 12);
    });
  }
}

extension MeasureGeneralQuerySortBy
    on QueryBuilder<MeasureGeneral, MeasureGeneral, QSortBy> {
  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> sortByName(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        1,
        caseSensitive: caseSensitive,
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> sortByNameDesc(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        1,
        sort: Sort.desc,
        caseSensitive: caseSensitive,
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      sortByBioDivScore() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(4);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      sortByBioDivScoreDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(4, sort: Sort.desc);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      sortByBaseUnitPrice({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        11,
        caseSensitive: caseSensitive,
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      sortByBaseUnitPriceDesc({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        11,
        sort: Sort.desc,
        caseSensitive: caseSensitive,
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> sortByRemarks(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        13,
        caseSensitive: caseSensitive,
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> sortByRemarksDesc(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        13,
        sort: Sort.desc,
        caseSensitive: caseSensitive,
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> sortByComposition(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        14,
        caseSensitive: caseSensitive,
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      sortByCompositionDesc({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(
        14,
        sort: Sort.desc,
        caseSensitive: caseSensitive,
      );
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> sortById() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(0);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> sortByIdDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(0, sort: Sort.desc);
    });
  }
}

extension MeasureGeneralQuerySortThenBy
    on QueryBuilder<MeasureGeneral, MeasureGeneral, QSortThenBy> {
  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> thenByName(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(1, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> thenByNameDesc(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      thenByBioDivScore() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(4);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      thenByBioDivScoreDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(4, sort: Sort.desc);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      thenByBaseUnitPrice({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(11, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      thenByBaseUnitPriceDesc({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(11, sort: Sort.desc, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> thenByRemarks(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(13, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> thenByRemarksDesc(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(13, sort: Sort.desc, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> thenByComposition(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(14, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy>
      thenByCompositionDesc({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(14, sort: Sort.desc, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> thenById() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(0);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterSortBy> thenByIdDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(0, sort: Sort.desc);
    });
  }
}

extension MeasureGeneralQueryWhereDistinct
    on QueryBuilder<MeasureGeneral, MeasureGeneral, QDistinct> {
  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterDistinct> distinctByName(
      {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(1, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterDistinct>
      distinctByBioDivScore() {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(4);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterDistinct>
      distinctByBaseUnitPrice({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(11, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterDistinct>
      distinctByRemarks({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(13, caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<MeasureGeneral, MeasureGeneral, QAfterDistinct>
      distinctByComposition({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(14, caseSensitive: caseSensitive);
    });
  }
}

extension MeasureGeneralQueryProperty1
    on QueryBuilder<MeasureGeneral, MeasureGeneral, QProperty> {
  QueryBuilder<MeasureGeneral, String?, QAfterProperty> nameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

  QueryBuilder<MeasureGeneral, List<IdValue>?, QAfterProperty>
      measureTypeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(2);
    });
  }

  QueryBuilder<MeasureGeneral, List<IdValueMix>?, QAfterProperty>
      measureGroupProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(3);
    });
  }

  QueryBuilder<MeasureGeneral, int?, QAfterProperty> bioDivScoreProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(4);
    });
  }

  QueryBuilder<MeasureGeneral, List<IdValue>?, QAfterProperty>
      producerOrProviderProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(5);
    });
  }

  QueryBuilder<MeasureGeneral, List<FilePart>?, QAfterProperty>
      filesProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(6);
    });
  }

  QueryBuilder<MeasureGeneral, List<IdValueColor>?, QAfterProperty>
      regionProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(7);
    });
  }

  QueryBuilder<MeasureGeneral, List<IdValueColor>?, QAfterProperty>
      applyTimeFrameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(8);
    });
  }

  QueryBuilder<MeasureGeneral, List<IdValue>?, QAfterProperty>
      organismsProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(9);
    });
  }

  QueryBuilder<MeasureGeneral, IdValueColor?, QAfterProperty>
      baseUnitProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(10);
    });
  }

  QueryBuilder<MeasureGeneral, String?, QAfterProperty>
      baseUnitPriceProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(11);
    });
  }

  QueryBuilder<MeasureGeneral, IdValueColor?, QAfterProperty> effortProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(12);
    });
  }

  QueryBuilder<MeasureGeneral, String?, QAfterProperty> remarksProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(13);
    });
  }

  QueryBuilder<MeasureGeneral, String?, QAfterProperty> compositionProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(14);
    });
  }

  QueryBuilder<MeasureGeneral, List<FilePart>?, QAfterProperty>
      resourcesProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(15);
    });
  }

  QueryBuilder<MeasureGeneral, int, QAfterProperty> idProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(0);
    });
  }
}

extension MeasureGeneralQueryProperty2<R>
    on QueryBuilder<MeasureGeneral, R, QAfterProperty> {
  QueryBuilder<MeasureGeneral, (R, String?), QAfterProperty> nameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

  QueryBuilder<MeasureGeneral, (R, List<IdValue>?), QAfterProperty>
      measureTypeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(2);
    });
  }

  QueryBuilder<MeasureGeneral, (R, List<IdValueMix>?), QAfterProperty>
      measureGroupProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(3);
    });
  }

  QueryBuilder<MeasureGeneral, (R, int?), QAfterProperty>
      bioDivScoreProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(4);
    });
  }

  QueryBuilder<MeasureGeneral, (R, List<IdValue>?), QAfterProperty>
      producerOrProviderProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(5);
    });
  }

  QueryBuilder<MeasureGeneral, (R, List<FilePart>?), QAfterProperty>
      filesProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(6);
    });
  }

  QueryBuilder<MeasureGeneral, (R, List<IdValueColor>?), QAfterProperty>
      regionProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(7);
    });
  }

  QueryBuilder<MeasureGeneral, (R, List<IdValueColor>?), QAfterProperty>
      applyTimeFrameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(8);
    });
  }

  QueryBuilder<MeasureGeneral, (R, List<IdValue>?), QAfterProperty>
      organismsProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(9);
    });
  }

  QueryBuilder<MeasureGeneral, (R, IdValueColor?), QAfterProperty>
      baseUnitProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(10);
    });
  }

  QueryBuilder<MeasureGeneral, (R, String?), QAfterProperty>
      baseUnitPriceProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(11);
    });
  }

  QueryBuilder<MeasureGeneral, (R, IdValueColor?), QAfterProperty>
      effortProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(12);
    });
  }

  QueryBuilder<MeasureGeneral, (R, String?), QAfterProperty> remarksProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(13);
    });
  }

  QueryBuilder<MeasureGeneral, (R, String?), QAfterProperty>
      compositionProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(14);
    });
  }

  QueryBuilder<MeasureGeneral, (R, List<FilePart>?), QAfterProperty>
      resourcesProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(15);
    });
  }

  QueryBuilder<MeasureGeneral, (R, int), QAfterProperty> idProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(0);
    });
  }
}

extension MeasureGeneralQueryProperty3<R1, R2>
    on QueryBuilder<MeasureGeneral, (R1, R2), QAfterProperty> {
  QueryBuilder<MeasureGeneral, (R1, R2, String?), QOperations> nameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(1);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, List<IdValue>?), QOperations>
      measureTypeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(2);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, List<IdValueMix>?), QOperations>
      measureGroupProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(3);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, int?), QOperations>
      bioDivScoreProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(4);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, List<IdValue>?), QOperations>
      producerOrProviderProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(5);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, List<FilePart>?), QOperations>
      filesProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(6);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, List<IdValueColor>?), QOperations>
      regionProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(7);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, List<IdValueColor>?), QOperations>
      applyTimeFrameProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(8);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, List<IdValue>?), QOperations>
      organismsProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(9);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, IdValueColor?), QOperations>
      baseUnitProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(10);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, String?), QOperations>
      baseUnitPriceProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(11);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, IdValueColor?), QOperations>
      effortProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(12);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, String?), QOperations>
      remarksProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(13);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, String?), QOperations>
      compositionProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(14);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, List<FilePart>?), QOperations>
      resourcesProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(15);
    });
  }

  QueryBuilder<MeasureGeneral, (R1, R2, int), QOperations> idProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addProperty(0);
    });
  }
}

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

MeasureGeneral _$MeasureGeneralFromJson(Map<String, dynamic> json) =>
    MeasureGeneral()
      ..id = (json['id'] as num).toInt()
      ..name = json['field_3021886'] as String?
      ..measureType = (json['field_3021893'] as List<dynamic>?)
          ?.map((e) => IdValue.fromJson(e as Map<String, dynamic>))
          .toList()
      ..measureGroup = (json['field_3050639'] as List<dynamic>?)
          ?.map((e) => IdValueMix.fromJson(e as Map<String, dynamic>))
          .toList()
      ..bioDivScore = (json['field_3021890'] as num?)?.toInt()
      ..producerOrProvider = (json['field_3021889'] as List<dynamic>?)
          ?.map((e) => IdValue.fromJson(e as Map<String, dynamic>))
          .toList()
      ..files = (json['field_3021896'] as List<dynamic>?)
          ?.map((e) => FilePart.fromJson(e as Map<String, dynamic>))
          .toList()
      ..region = (json['field_3021990'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList()
      ..applyTimeFrame = (json['field_3050742'] as List<dynamic>?)
          ?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
          .toList()
      ..organisms = (json['field_3024626'] as List<dynamic>?)
          ?.map((e) => IdValue.fromJson(e as Map<String, dynamic>))
          .toList()
      ..baseUnit = json['field_3021904'] == null
          ? null
          : IdValueColor.fromJson(json['field_3021904'] as Map<String, dynamic>)
      ..baseUnitPrice = json['field_3021892'] as String?
      ..effort = json['field_3049762'] == null
          ? null
          : IdValueColor.fromJson(json['field_3049762'] as Map<String, dynamic>)
      ..remarks = json['field_3021887'] as String?
      ..composition = json['field_3021888'] as String?
      ..resources = (json['field_3049760'] as List<dynamic>?)
          ?.map((e) => FilePart.fromJson(e as Map<String, dynamic>))
          .toList();

Map<String, dynamic> _$MeasureGeneralToJson(MeasureGeneral instance) =>
    <String, dynamic>{
      'id': instance.id,
      'field_3021886': instance.name,
      'field_3021893': instance.measureType?.map((e) => e.toJson()).toList(),
      'field_3050639': instance.measureGroup?.map((e) => e.toJson()).toList(),
      'field_3021890': instance.bioDivScore,
      'field_3021889':
          instance.producerOrProvider?.map((e) => e.toJson()).toList(),
      'field_3021896': instance.files?.map((e) => e.toJson()).toList(),
      'field_3021990': instance.region?.map((e) => e.toJson()).toList(),
      'field_3050742': instance.applyTimeFrame?.map((e) => e.toJson()).toList(),
      'field_3024626': instance.organisms?.map((e) => e.toJson()).toList(),
      'field_3021904': instance.baseUnit?.toJson(),
      'field_3021892': instance.baseUnitPrice,
      'field_3049762': instance.effort?.toJson(),
      'field_3021887': instance.remarks,
      'field_3021888': instance.composition,
      'field_3049760': instance.resources?.map((e) => e.toJson()).toList(),
    };
