// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'device_asset.entity.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 GetDeviceAssetEntityCollection on Isar {
  IsarCollection<DeviceAssetEntity> get deviceAssetEntitys => this.collection();
}

const DeviceAssetEntitySchema = CollectionSchema(
  name: r'DeviceAssetEntity',
  id: 6967030785073446271,
  properties: {
    r'assetId': PropertySchema(id: 0, name: r'assetId', type: IsarType.string),
    r'hash': PropertySchema(id: 1, name: r'hash', type: IsarType.byteList),
    r'modifiedTime': PropertySchema(
      id: 2,
      name: r'modifiedTime',
      type: IsarType.dateTime,
    ),
  },

  estimateSize: _deviceAssetEntityEstimateSize,
  serialize: _deviceAssetEntitySerialize,
  deserialize: _deviceAssetEntityDeserialize,
  deserializeProp: _deviceAssetEntityDeserializeProp,
  idName: r'id',
  indexes: {
    r'assetId': IndexSchema(
      id: 174362542210192109,
      name: r'assetId',
      unique: true,
      replace: true,
      properties: [
        IndexPropertySchema(
          name: r'assetId',
          type: IndexType.hash,
          caseSensitive: true,
        ),
      ],
    ),
    r'hash': IndexSchema(
      id: -7973251393006690288,
      name: r'hash',
      unique: false,
      replace: false,
      properties: [
        IndexPropertySchema(
          name: r'hash',
          type: IndexType.hash,
          caseSensitive: false,
        ),
      ],
    ),
  },
  links: {},
  embeddedSchemas: {},

  getId: _deviceAssetEntityGetId,
  getLinks: _deviceAssetEntityGetLinks,
  attach: _deviceAssetEntityAttach,
  version: '3.3.0-dev.3',
);

int _deviceAssetEntityEstimateSize(
  DeviceAssetEntity object,
  List<int> offsets,
  Map<Type, List<int>> allOffsets,
) {
  var bytesCount = offsets.last;
  bytesCount += 3 + object.assetId.length * 3;
  bytesCount += 3 + object.hash.length;
  return bytesCount;
}

void _deviceAssetEntitySerialize(
  DeviceAssetEntity object,
  IsarWriter writer,
  List<int> offsets,
  Map<Type, List<int>> allOffsets,
) {
  writer.writeString(offsets[0], object.assetId);
  writer.writeByteList(offsets[1], object.hash);
  writer.writeDateTime(offsets[2], object.modifiedTime);
}

DeviceAssetEntity _deviceAssetEntityDeserialize(
  Id id,
  IsarReader reader,
  List<int> offsets,
  Map<Type, List<int>> allOffsets,
) {
  final object = DeviceAssetEntity(
    assetId: reader.readString(offsets[0]),
    hash: reader.readByteList(offsets[1]) ?? [],
    modifiedTime: reader.readDateTime(offsets[2]),
  );
  return object;
}

P _deviceAssetEntityDeserializeProp<P>(
  IsarReader reader,
  int propertyId,
  int offset,
  Map<Type, List<int>> allOffsets,
) {
  switch (propertyId) {
    case 0:
      return (reader.readString(offset)) as P;
    case 1:
      return (reader.readByteList(offset) ?? []) as P;
    case 2:
      return (reader.readDateTime(offset)) as P;
    default:
      throw IsarError('Unknown property with id $propertyId');
  }
}

Id _deviceAssetEntityGetId(DeviceAssetEntity object) {
  return object.id;
}

List<IsarLinkBase<dynamic>> _deviceAssetEntityGetLinks(
  DeviceAssetEntity object,
) {
  return [];
}

void _deviceAssetEntityAttach(
  IsarCollection<dynamic> col,
  Id id,
  DeviceAssetEntity object,
) {}

extension DeviceAssetEntityByIndex on IsarCollection<DeviceAssetEntity> {
  Future<DeviceAssetEntity?> getByAssetId(String assetId) {
    return getByIndex(r'assetId', [assetId]);
  }

  DeviceAssetEntity? getByAssetIdSync(String assetId) {
    return getByIndexSync(r'assetId', [assetId]);
  }

  Future<bool> deleteByAssetId(String assetId) {
    return deleteByIndex(r'assetId', [assetId]);
  }

  bool deleteByAssetIdSync(String assetId) {
    return deleteByIndexSync(r'assetId', [assetId]);
  }

  Future<List<DeviceAssetEntity?>> getAllByAssetId(List<String> assetIdValues) {
    final values = assetIdValues.map((e) => [e]).toList();
    return getAllByIndex(r'assetId', values);
  }

  List<DeviceAssetEntity?> getAllByAssetIdSync(List<String> assetIdValues) {
    final values = assetIdValues.map((e) => [e]).toList();
    return getAllByIndexSync(r'assetId', values);
  }

  Future<int> deleteAllByAssetId(List<String> assetIdValues) {
    final values = assetIdValues.map((e) => [e]).toList();
    return deleteAllByIndex(r'assetId', values);
  }

  int deleteAllByAssetIdSync(List<String> assetIdValues) {
    final values = assetIdValues.map((e) => [e]).toList();
    return deleteAllByIndexSync(r'assetId', values);
  }

  Future<Id> putByAssetId(DeviceAssetEntity object) {
    return putByIndex(r'assetId', object);
  }

  Id putByAssetIdSync(DeviceAssetEntity object, {bool saveLinks = true}) {
    return putByIndexSync(r'assetId', object, saveLinks: saveLinks);
  }

  Future<List<Id>> putAllByAssetId(List<DeviceAssetEntity> objects) {
    return putAllByIndex(r'assetId', objects);
  }

  List<Id> putAllByAssetIdSync(
    List<DeviceAssetEntity> objects, {
    bool saveLinks = true,
  }) {
    return putAllByIndexSync(r'assetId', objects, saveLinks: saveLinks);
  }
}

extension DeviceAssetEntityQueryWhereSort
    on QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QWhere> {
  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterWhere> anyId() {
    return QueryBuilder.apply(this, (query) {
      return query.addWhereClause(const IdWhereClause.any());
    });
  }
}

extension DeviceAssetEntityQueryWhere
    on QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QWhereClause> {
  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterWhereClause>
  idEqualTo(Id id) {
    return QueryBuilder.apply(this, (query) {
      return query.addWhereClause(IdWhereClause.between(lower: id, upper: id));
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, 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<DeviceAssetEntity, DeviceAssetEntity, QAfterWhereClause>
  idGreaterThan(Id id, {bool include = false}) {
    return QueryBuilder.apply(this, (query) {
      return query.addWhereClause(
        IdWhereClause.greaterThan(lower: id, includeLower: include),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterWhereClause>
  idLessThan(Id id, {bool include = false}) {
    return QueryBuilder.apply(this, (query) {
      return query.addWhereClause(
        IdWhereClause.lessThan(upper: id, includeUpper: include),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, 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,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterWhereClause>
  assetIdEqualTo(String assetId) {
    return QueryBuilder.apply(this, (query) {
      return query.addWhereClause(
        IndexWhereClause.equalTo(indexName: r'assetId', value: [assetId]),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterWhereClause>
  assetIdNotEqualTo(String assetId) {
    return QueryBuilder.apply(this, (query) {
      if (query.whereSort == Sort.asc) {
        return query
            .addWhereClause(
              IndexWhereClause.between(
                indexName: r'assetId',
                lower: [],
                upper: [assetId],
                includeUpper: false,
              ),
            )
            .addWhereClause(
              IndexWhereClause.between(
                indexName: r'assetId',
                lower: [assetId],
                includeLower: false,
                upper: [],
              ),
            );
      } else {
        return query
            .addWhereClause(
              IndexWhereClause.between(
                indexName: r'assetId',
                lower: [assetId],
                includeLower: false,
                upper: [],
              ),
            )
            .addWhereClause(
              IndexWhereClause.between(
                indexName: r'assetId',
                lower: [],
                upper: [assetId],
                includeUpper: false,
              ),
            );
      }
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterWhereClause>
  hashEqualTo(List<int> hash) {
    return QueryBuilder.apply(this, (query) {
      return query.addWhereClause(
        IndexWhereClause.equalTo(indexName: r'hash', value: [hash]),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterWhereClause>
  hashNotEqualTo(List<int> hash) {
    return QueryBuilder.apply(this, (query) {
      if (query.whereSort == Sort.asc) {
        return query
            .addWhereClause(
              IndexWhereClause.between(
                indexName: r'hash',
                lower: [],
                upper: [hash],
                includeUpper: false,
              ),
            )
            .addWhereClause(
              IndexWhereClause.between(
                indexName: r'hash',
                lower: [hash],
                includeLower: false,
                upper: [],
              ),
            );
      } else {
        return query
            .addWhereClause(
              IndexWhereClause.between(
                indexName: r'hash',
                lower: [hash],
                includeLower: false,
                upper: [],
              ),
            )
            .addWhereClause(
              IndexWhereClause.between(
                indexName: r'hash',
                lower: [],
                upper: [hash],
                includeUpper: false,
              ),
            );
      }
    });
  }
}

extension DeviceAssetEntityQueryFilter
    on QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QFilterCondition> {
  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdEqualTo(String value, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.equalTo(
          property: r'assetId',
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdGreaterThan(
    String value, {
    bool include = false,
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.greaterThan(
          include: include,
          property: r'assetId',
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdLessThan(
    String value, {
    bool include = false,
    bool caseSensitive = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.lessThan(
          include: include,
          property: r'assetId',
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdBetween(
    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'assetId',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdStartsWith(String value, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.startsWith(
          property: r'assetId',
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdEndsWith(String value, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.endsWith(
          property: r'assetId',
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdContains(String value, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.contains(
          property: r'assetId',
          value: value,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdMatches(String pattern, {bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.matches(
          property: r'assetId',
          wildcard: pattern,
          caseSensitive: caseSensitive,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.equalTo(property: r'assetId', value: ''),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  assetIdIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.greaterThan(property: r'assetId', value: ''),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashElementEqualTo(int value) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.equalTo(property: r'hash', value: value),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashElementGreaterThan(int value, {bool include = false}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.greaterThan(
          include: include,
          property: r'hash',
          value: value,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashElementLessThan(int value, {bool include = false}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.lessThan(
          include: include,
          property: r'hash',
          value: value,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashElementBetween(
    int lower,
    int upper, {
    bool includeLower = true,
    bool includeUpper = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.between(
          property: r'hash',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashLengthEqualTo(int length) {
    return QueryBuilder.apply(this, (query) {
      return query.listLength(r'hash', length, true, length, true);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashIsEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.listLength(r'hash', 0, true, 0, true);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashIsNotEmpty() {
    return QueryBuilder.apply(this, (query) {
      return query.listLength(r'hash', 0, false, 999999, true);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashLengthLessThan(int length, {bool include = false}) {
    return QueryBuilder.apply(this, (query) {
      return query.listLength(r'hash', 0, true, length, include);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashLengthGreaterThan(int length, {bool include = false}) {
    return QueryBuilder.apply(this, (query) {
      return query.listLength(r'hash', length, include, 999999, true);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  hashLengthBetween(
    int lower,
    int upper, {
    bool includeLower = true,
    bool includeUpper = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.listLength(
        r'hash',
        lower,
        includeLower,
        upper,
        includeUpper,
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  idEqualTo(Id value) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.equalTo(property: r'id', value: value),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, 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<DeviceAssetEntity, DeviceAssetEntity, 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<DeviceAssetEntity, DeviceAssetEntity, 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<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  modifiedTimeEqualTo(DateTime value) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.equalTo(property: r'modifiedTime', value: value),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  modifiedTimeGreaterThan(DateTime value, {bool include = false}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.greaterThan(
          include: include,
          property: r'modifiedTime',
          value: value,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  modifiedTimeLessThan(DateTime value, {bool include = false}) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.lessThan(
          include: include,
          property: r'modifiedTime',
          value: value,
        ),
      );
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterFilterCondition>
  modifiedTimeBetween(
    DateTime lower,
    DateTime upper, {
    bool includeLower = true,
    bool includeUpper = true,
  }) {
    return QueryBuilder.apply(this, (query) {
      return query.addFilterCondition(
        FilterCondition.between(
          property: r'modifiedTime',
          lower: lower,
          includeLower: includeLower,
          upper: upper,
          includeUpper: includeUpper,
        ),
      );
    });
  }
}

extension DeviceAssetEntityQueryObject
    on QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QFilterCondition> {}

extension DeviceAssetEntityQueryLinks
    on QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QFilterCondition> {}

extension DeviceAssetEntityQuerySortBy
    on QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QSortBy> {
  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy>
  sortByAssetId() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'assetId', Sort.asc);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy>
  sortByAssetIdDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'assetId', Sort.desc);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy>
  sortByModifiedTime() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'modifiedTime', Sort.asc);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy>
  sortByModifiedTimeDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'modifiedTime', Sort.desc);
    });
  }
}

extension DeviceAssetEntityQuerySortThenBy
    on QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QSortThenBy> {
  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy>
  thenByAssetId() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'assetId', Sort.asc);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy>
  thenByAssetIdDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'assetId', Sort.desc);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy> thenById() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'id', Sort.asc);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy>
  thenByIdDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'id', Sort.desc);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy>
  thenByModifiedTime() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'modifiedTime', Sort.asc);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QAfterSortBy>
  thenByModifiedTimeDesc() {
    return QueryBuilder.apply(this, (query) {
      return query.addSortBy(r'modifiedTime', Sort.desc);
    });
  }
}

extension DeviceAssetEntityQueryWhereDistinct
    on QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QDistinct> {
  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QDistinct>
  distinctByAssetId({bool caseSensitive = true}) {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(r'assetId', caseSensitive: caseSensitive);
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QDistinct>
  distinctByHash() {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(r'hash');
    });
  }

  QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QDistinct>
  distinctByModifiedTime() {
    return QueryBuilder.apply(this, (query) {
      return query.addDistinctBy(r'modifiedTime');
    });
  }
}

extension DeviceAssetEntityQueryProperty
    on QueryBuilder<DeviceAssetEntity, DeviceAssetEntity, QQueryProperty> {
  QueryBuilder<DeviceAssetEntity, int, QQueryOperations> idProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addPropertyName(r'id');
    });
  }

  QueryBuilder<DeviceAssetEntity, String, QQueryOperations> assetIdProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addPropertyName(r'assetId');
    });
  }

  QueryBuilder<DeviceAssetEntity, List<int>, QQueryOperations> hashProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addPropertyName(r'hash');
    });
  }

  QueryBuilder<DeviceAssetEntity, DateTime, QQueryOperations>
  modifiedTimeProperty() {
    return QueryBuilder.apply(this, (query) {
      return query.addPropertyName(r'modifiedTime');
    });
  }
}
