// GENERATED CODE - DO NOT MODIFY BY HAND
// This code was generated by ObjectBox. To update it run the generator again
// with `dart run build_runner build`.
// See also https://docs.objectbox.io/getting-started#generate-objectbox-code

// ignore_for_file: camel_case_types, depend_on_referenced_packages
// coverage:ignore-file

import 'dart:typed_data';

import 'package:flat_buffers/flat_buffers.dart' as fb;
import 'package:objectbox/internal.dart'
    as obx_int; // generated code can access "internal" functionality
import 'package:objectbox/objectbox.dart' as obx;
import 'package:objectbox_flutter_libs/objectbox_flutter_libs.dart';

import 'entities/chat_message_entity.dart';
import 'entities/job_entity.dart';
import 'entities/photo_entity.dart';
import 'entities/queued_message_entity.dart';
import 'entities/task_status_entity.dart';
import 'entities/user_data_entity.dart';

export 'package:objectbox/objectbox.dart'; // so that callers only have to import this file

final _entities = <obx_int.ModelEntity>[
  obx_int.ModelEntity(
    id: const obx_int.IdUid(1, 7611693027744165533),
    name: 'ChatMessageEntity',
    lastPropertyId: const obx_int.IdUid(12, 2309286538364575316),
    flags: 0,
    properties: <obx_int.ModelProperty>[
      obx_int.ModelProperty(
        id: const obx_int.IdUid(1, 2877174849434222825),
        name: 'id',
        type: 6,
        flags: 1,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(2, 7133214518465925033),
        name: 'messageId',
        type: 9,
        flags: 2080,
        indexId: const obx_int.IdUid(1, 5239829446791635795),
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(3, 4299321820179972091),
        name: 'conversationKey',
        type: 9,
        flags: 2048,
        indexId: const obx_int.IdUid(2, 7958984541640853733),
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(4, 5939280612219671854),
        name: 'content',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(5, 3937520230579179052),
        name: 'contentType',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(6, 824275627423835844),
        name: 'createdAt',
        type: 10,
        flags: 8,
        indexId: const obx_int.IdUid(3, 5224279695299690370),
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(7, 4938488440801306283),
        name: 'origin',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(8, 3675289388362712872),
        name: 'messageType',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(9, 5014932119114547439),
        name: 'jobId',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(10, 6511433113986718524),
        name: 'jobNumber',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(11, 7341546288167795221),
        name: 'read',
        type: 1,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(12, 2309286538364575316),
        name: 'pendingSync',
        type: 1,
        flags: 0,
      ),
    ],
    relations: <obx_int.ModelRelation>[],
    backlinks: <obx_int.ModelBacklink>[],
  ),
  obx_int.ModelEntity(
    id: const obx_int.IdUid(2, 2377210606864651652),
    name: 'JobEntity',
    lastPropertyId: const obx_int.IdUid(5, 4330118937838819262),
    flags: 0,
    properties: <obx_int.ModelProperty>[
      obx_int.ModelProperty(
        id: const obx_int.IdUid(1, 5764695419124422056),
        name: 'id',
        type: 6,
        flags: 1,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(2, 5230369747102400974),
        name: 'jobId',
        type: 9,
        flags: 2080,
        indexId: const obx_int.IdUid(4, 5912728233158498728),
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(3, 8786313603756997847),
        name: 'jobData',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(4, 9125996217822689005),
        name: 'createdAt',
        type: 10,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(5, 4330118937838819262),
        name: 'updatedAt',
        type: 10,
        flags: 0,
      ),
    ],
    relations: <obx_int.ModelRelation>[],
    backlinks: <obx_int.ModelBacklink>[],
  ),
  obx_int.ModelEntity(
    id: const obx_int.IdUid(3, 5853367178512403842),
    name: 'PhotoEntity',
    lastPropertyId: const obx_int.IdUid(5, 7993370300880580866),
    flags: 0,
    properties: <obx_int.ModelProperty>[
      obx_int.ModelProperty(
        id: const obx_int.IdUid(1, 4387782442589683314),
        name: 'id',
        type: 6,
        flags: 1,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(2, 7269827572185524897),
        name: 'taskId',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(3, 117404329471165159),
        name: 'photoIndex',
        type: 6,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(4, 175585982820628578),
        name: 'data',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(5, 7993370300880580866),
        name: 'createdAt',
        type: 10,
        flags: 0,
      ),
    ],
    relations: <obx_int.ModelRelation>[],
    backlinks: <obx_int.ModelBacklink>[],
  ),
  obx_int.ModelEntity(
    id: const obx_int.IdUid(4, 3098331694244942316),
    name: 'QueuedMessageEntity',
    lastPropertyId: const obx_int.IdUid(6, 8514324254890213490),
    flags: 0,
    properties: <obx_int.ModelProperty>[
      obx_int.ModelProperty(
        id: const obx_int.IdUid(1, 7708425959688472926),
        name: 'id',
        type: 6,
        flags: 1,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(2, 6817215813894799570),
        name: 'messageId',
        type: 9,
        flags: 2080,
        indexId: const obx_int.IdUid(5, 853241783777319657),
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(3, 60965955604348905),
        name: 'topic',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(4, 4779773601253035683),
        name: 'payload',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(5, 2120244644382713824),
        name: 'createdAt',
        type: 10,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(6, 8514324254890213490),
        name: 'retryCount',
        type: 6,
        flags: 0,
      ),
    ],
    relations: <obx_int.ModelRelation>[],
    backlinks: <obx_int.ModelBacklink>[],
  ),
  obx_int.ModelEntity(
    id: const obx_int.IdUid(5, 2194624907249454848),
    name: 'TaskStatusEntity',
    lastPropertyId: const obx_int.IdUid(7, 5673785903451668117),
    flags: 0,
    properties: <obx_int.ModelProperty>[
      obx_int.ModelProperty(
        id: const obx_int.IdUid(1, 2660897068318660363),
        name: 'id',
        type: 6,
        flags: 1,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(2, 2717300553109032772),
        name: 'taskId',
        type: 9,
        flags: 2080,
        indexId: const obx_int.IdUid(6, 3594410711639811810),
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(3, 1940249619044527831),
        name: 'completed',
        type: 1,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(4, 5172336642033012706),
        name: 'completedAt',
        type: 10,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(5, 5219138373705672631),
        name: 'createdAt',
        type: 10,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(6, 5035828038544573244),
        name: 'updatedAt',
        type: 10,
        flags: 0,
      ),
    ],
    relations: <obx_int.ModelRelation>[],
    backlinks: <obx_int.ModelBacklink>[],
  ),
  obx_int.ModelEntity(
    id: const obx_int.IdUid(6, 753334402157356597),
    name: 'UserDataEntity',
    lastPropertyId: const obx_int.IdUid(5, 7622589620848481852),
    flags: 0,
    properties: <obx_int.ModelProperty>[
      obx_int.ModelProperty(
        id: const obx_int.IdUid(1, 258617559550142129),
        name: 'id',
        type: 6,
        flags: 1,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(2, 3549771662483971304),
        name: 'key',
        type: 9,
        flags: 2080,
        indexId: const obx_int.IdUid(7, 8692774416314022957),
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(3, 6572116502376820780),
        name: 'value',
        type: 9,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(4, 6220239104166844131),
        name: 'createdAt',
        type: 10,
        flags: 0,
      ),
      obx_int.ModelProperty(
        id: const obx_int.IdUid(5, 7622589620848481852),
        name: 'updatedAt',
        type: 10,
        flags: 0,
      ),
    ],
    relations: <obx_int.ModelRelation>[],
    backlinks: <obx_int.ModelBacklink>[],
  ),
];

/// Shortcut for [obx.Store.new] that passes [getObjectBoxModel] and for Flutter
/// apps by default a [directory] using `defaultStoreDirectory()` from the
/// ObjectBox Flutter library.
///
/// Note: for desktop apps it is recommended to specify a unique [directory].
///
/// See [obx.Store.new] for an explanation of all parameters.
///
/// For Flutter apps, also calls `loadObjectBoxLibraryAndroidCompat()` from
/// the ObjectBox Flutter library to fix loading the native ObjectBox library
/// on Android 6 and older.
Future<obx.Store> openStore({
  String? directory,
  int? maxDBSizeInKB,
  int? maxDataSizeInKB,
  int? fileMode,
  int? maxReaders,
  bool queriesCaseSensitiveDefault = true,
  String? macosApplicationGroup,
}) async {
  await loadObjectBoxLibraryAndroidCompat();
  return obx.Store(
    getObjectBoxModel(),
    directory: directory ?? (await defaultStoreDirectory()).path,
    maxDBSizeInKB: maxDBSizeInKB,
    maxDataSizeInKB: maxDataSizeInKB,
    fileMode: fileMode,
    maxReaders: maxReaders,
    queriesCaseSensitiveDefault: queriesCaseSensitiveDefault,
    macosApplicationGroup: macosApplicationGroup,
  );
}

/// Returns the ObjectBox model definition for this project for use with
/// [obx.Store.new].
obx_int.ModelDefinition getObjectBoxModel() {
  final model = obx_int.ModelInfo(
    entities: _entities,
    lastEntityId: const obx_int.IdUid(6, 753334402157356597),
    lastIndexId: const obx_int.IdUid(7, 8692774416314022957),
    lastRelationId: const obx_int.IdUid(0, 0),
    lastSequenceId: const obx_int.IdUid(0, 0),
    retiredEntityUids: const [],
    retiredIndexUids: const [],
    retiredPropertyUids: const [5673785903451668117],
    retiredRelationUids: const [],
    modelVersion: 5,
    modelVersionParserMinimum: 5,
    version: 1,
  );

  final bindings = <Type, obx_int.EntityDefinition>{
    ChatMessageEntity: obx_int.EntityDefinition<ChatMessageEntity>(
      model: _entities[0],
      toOneRelations: (ChatMessageEntity object) => [],
      toManyRelations: (ChatMessageEntity object) => {},
      getId: (ChatMessageEntity object) => object.id,
      setId: (ChatMessageEntity object, int id) {
        object.id = id;
      },
      objectToFB: (ChatMessageEntity object, fb.Builder fbb) {
        final messageIdOffset = fbb.writeString(object.messageId);
        final conversationKeyOffset = fbb.writeString(object.conversationKey);
        final contentOffset = fbb.writeString(object.content);
        final contentTypeOffset = fbb.writeString(object.contentType);
        final originOffset = fbb.writeString(object.origin);
        final messageTypeOffset = fbb.writeString(object.messageType);
        final jobIdOffset = object.jobId == null
            ? null
            : fbb.writeString(object.jobId!);
        final jobNumberOffset = object.jobNumber == null
            ? null
            : fbb.writeString(object.jobNumber!);
        fbb.startTable(13);
        fbb.addInt64(0, object.id);
        fbb.addOffset(1, messageIdOffset);
        fbb.addOffset(2, conversationKeyOffset);
        fbb.addOffset(3, contentOffset);
        fbb.addOffset(4, contentTypeOffset);
        fbb.addInt64(5, object.createdAt.millisecondsSinceEpoch);
        fbb.addOffset(6, originOffset);
        fbb.addOffset(7, messageTypeOffset);
        fbb.addOffset(8, jobIdOffset);
        fbb.addOffset(9, jobNumberOffset);
        fbb.addBool(10, object.read);
        fbb.addBool(11, object.pendingSync);
        fbb.finish(fbb.endTable());
        return object.id;
      },
      objectFromFB: (obx.Store store, ByteData fbData) {
        final buffer = fb.BufferContext(fbData);
        final rootOffset = buffer.derefObject(0);
        final messageIdParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 6, '');
        final conversationKeyParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 8, '');
        final contentParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 10, '');
        final contentTypeParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 12, '');
        final createdAtParam = DateTime.fromMillisecondsSinceEpoch(
          const fb.Int64Reader().vTableGet(buffer, rootOffset, 14, 0),
        );
        final originParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 16, '');
        final messageTypeParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 18, '');
        final jobIdParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGetNullable(buffer, rootOffset, 20);
        final jobNumberParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGetNullable(buffer, rootOffset, 22);
        final readParam = const fb.BoolReader().vTableGet(
          buffer,
          rootOffset,
          24,
          false,
        );
        final pendingSyncParam = const fb.BoolReader().vTableGet(
          buffer,
          rootOffset,
          26,
          false,
        );
        final object = ChatMessageEntity(
          messageId: messageIdParam,
          conversationKey: conversationKeyParam,
          content: contentParam,
          contentType: contentTypeParam,
          createdAt: createdAtParam,
          origin: originParam,
          messageType: messageTypeParam,
          jobId: jobIdParam,
          jobNumber: jobNumberParam,
          read: readParam,
          pendingSync: pendingSyncParam,
        )..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);

        return object;
      },
    ),
    JobEntity: obx_int.EntityDefinition<JobEntity>(
      model: _entities[1],
      toOneRelations: (JobEntity object) => [],
      toManyRelations: (JobEntity object) => {},
      getId: (JobEntity object) => object.id,
      setId: (JobEntity object, int id) {
        object.id = id;
      },
      objectToFB: (JobEntity object, fb.Builder fbb) {
        final jobIdOffset = fbb.writeString(object.jobId);
        final jobDataOffset = fbb.writeString(object.jobData);
        fbb.startTable(6);
        fbb.addInt64(0, object.id);
        fbb.addOffset(1, jobIdOffset);
        fbb.addOffset(2, jobDataOffset);
        fbb.addInt64(3, object.createdAt.millisecondsSinceEpoch);
        fbb.addInt64(4, object.updatedAt.millisecondsSinceEpoch);
        fbb.finish(fbb.endTable());
        return object.id;
      },
      objectFromFB: (obx.Store store, ByteData fbData) {
        final buffer = fb.BufferContext(fbData);
        final rootOffset = buffer.derefObject(0);
        final jobIdParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 6, '');
        final jobDataParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 8, '');
        final createdAtParam = DateTime.fromMillisecondsSinceEpoch(
          const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0),
        );
        final updatedAtParam = DateTime.fromMillisecondsSinceEpoch(
          const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0),
        );
        final object = JobEntity(
          jobId: jobIdParam,
          jobData: jobDataParam,
          createdAt: createdAtParam,
          updatedAt: updatedAtParam,
        )..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);

        return object;
      },
    ),
    PhotoEntity: obx_int.EntityDefinition<PhotoEntity>(
      model: _entities[2],
      toOneRelations: (PhotoEntity object) => [],
      toManyRelations: (PhotoEntity object) => {},
      getId: (PhotoEntity object) => object.id,
      setId: (PhotoEntity object, int id) {
        object.id = id;
      },
      objectToFB: (PhotoEntity object, fb.Builder fbb) {
        final taskIdOffset = fbb.writeString(object.taskId);
        final dataOffset = fbb.writeString(object.data);
        fbb.startTable(6);
        fbb.addInt64(0, object.id);
        fbb.addOffset(1, taskIdOffset);
        fbb.addInt64(2, object.photoIndex);
        fbb.addOffset(3, dataOffset);
        fbb.addInt64(4, object.createdAt.millisecondsSinceEpoch);
        fbb.finish(fbb.endTable());
        return object.id;
      },
      objectFromFB: (obx.Store store, ByteData fbData) {
        final buffer = fb.BufferContext(fbData);
        final rootOffset = buffer.derefObject(0);
        final taskIdParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 6, '');
        final photoIndexParam = const fb.Int64Reader().vTableGet(
          buffer,
          rootOffset,
          8,
          0,
        );
        final dataParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 10, '');
        final createdAtParam = DateTime.fromMillisecondsSinceEpoch(
          const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0),
        );
        final object = PhotoEntity(
          taskId: taskIdParam,
          photoIndex: photoIndexParam,
          data: dataParam,
          createdAt: createdAtParam,
        )..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);

        return object;
      },
    ),
    QueuedMessageEntity: obx_int.EntityDefinition<QueuedMessageEntity>(
      model: _entities[3],
      toOneRelations: (QueuedMessageEntity object) => [],
      toManyRelations: (QueuedMessageEntity object) => {},
      getId: (QueuedMessageEntity object) => object.id,
      setId: (QueuedMessageEntity object, int id) {
        object.id = id;
      },
      objectToFB: (QueuedMessageEntity object, fb.Builder fbb) {
        final messageIdOffset = fbb.writeString(object.messageId);
        final topicOffset = fbb.writeString(object.topic);
        final payloadOffset = fbb.writeString(object.payload);
        fbb.startTable(7);
        fbb.addInt64(0, object.id);
        fbb.addOffset(1, messageIdOffset);
        fbb.addOffset(2, topicOffset);
        fbb.addOffset(3, payloadOffset);
        fbb.addInt64(4, object.createdAt.millisecondsSinceEpoch);
        fbb.addInt64(5, object.retryCount);
        fbb.finish(fbb.endTable());
        return object.id;
      },
      objectFromFB: (obx.Store store, ByteData fbData) {
        final buffer = fb.BufferContext(fbData);
        final rootOffset = buffer.derefObject(0);
        final messageIdParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 6, '');
        final topicParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 8, '');
        final payloadParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 10, '');
        final createdAtParam = DateTime.fromMillisecondsSinceEpoch(
          const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0),
        );
        final retryCountParam = const fb.Int64Reader().vTableGet(
          buffer,
          rootOffset,
          14,
          0,
        );
        final object = QueuedMessageEntity(
          messageId: messageIdParam,
          topic: topicParam,
          payload: payloadParam,
          createdAt: createdAtParam,
          retryCount: retryCountParam,
        )..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);

        return object;
      },
    ),
    TaskStatusEntity: obx_int.EntityDefinition<TaskStatusEntity>(
      model: _entities[4],
      toOneRelations: (TaskStatusEntity object) => [],
      toManyRelations: (TaskStatusEntity object) => {},
      getId: (TaskStatusEntity object) => object.id,
      setId: (TaskStatusEntity object, int id) {
        object.id = id;
      },
      objectToFB: (TaskStatusEntity object, fb.Builder fbb) {
        final taskIdOffset = fbb.writeString(object.taskId);
        fbb.startTable(8);
        fbb.addInt64(0, object.id);
        fbb.addOffset(1, taskIdOffset);
        fbb.addBool(2, object.completed);
        fbb.addInt64(3, object.completedAt?.millisecondsSinceEpoch);
        fbb.addInt64(4, object.createdAt.millisecondsSinceEpoch);
        fbb.addInt64(5, object.updatedAt.millisecondsSinceEpoch);
        fbb.finish(fbb.endTable());
        return object.id;
      },
      objectFromFB: (obx.Store store, ByteData fbData) {
        final buffer = fb.BufferContext(fbData);
        final rootOffset = buffer.derefObject(0);
        final completedAtValue = const fb.Int64Reader().vTableGetNullable(
          buffer,
          rootOffset,
          10,
        );
        final taskIdParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 6, '');
        final completedParam = const fb.BoolReader().vTableGet(
          buffer,
          rootOffset,
          8,
          false,
        );
        final completedAtParam = completedAtValue == null
            ? null
            : DateTime.fromMillisecondsSinceEpoch(completedAtValue);
        final createdAtParam = DateTime.fromMillisecondsSinceEpoch(
          const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0),
        );
        final updatedAtParam = DateTime.fromMillisecondsSinceEpoch(
          const fb.Int64Reader().vTableGet(buffer, rootOffset, 14, 0),
        );
        final object = TaskStatusEntity(
          taskId: taskIdParam,
          completed: completedParam,
          completedAt: completedAtParam,
          createdAt: createdAtParam,
          updatedAt: updatedAtParam,
        )..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);

        return object;
      },
    ),
    UserDataEntity: obx_int.EntityDefinition<UserDataEntity>(
      model: _entities[5],
      toOneRelations: (UserDataEntity object) => [],
      toManyRelations: (UserDataEntity object) => {},
      getId: (UserDataEntity object) => object.id,
      setId: (UserDataEntity object, int id) {
        object.id = id;
      },
      objectToFB: (UserDataEntity object, fb.Builder fbb) {
        final keyOffset = fbb.writeString(object.key);
        final valueOffset = fbb.writeString(object.value);
        fbb.startTable(6);
        fbb.addInt64(0, object.id);
        fbb.addOffset(1, keyOffset);
        fbb.addOffset(2, valueOffset);
        fbb.addInt64(3, object.createdAt.millisecondsSinceEpoch);
        fbb.addInt64(4, object.updatedAt.millisecondsSinceEpoch);
        fbb.finish(fbb.endTable());
        return object.id;
      },
      objectFromFB: (obx.Store store, ByteData fbData) {
        final buffer = fb.BufferContext(fbData);
        final rootOffset = buffer.derefObject(0);
        final keyParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 6, '');
        final valueParam = const fb.StringReader(
          asciiOptimization: true,
        ).vTableGet(buffer, rootOffset, 8, '');
        final createdAtParam = DateTime.fromMillisecondsSinceEpoch(
          const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0),
        );
        final updatedAtParam = DateTime.fromMillisecondsSinceEpoch(
          const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0),
        );
        final object = UserDataEntity(
          key: keyParam,
          value: valueParam,
          createdAt: createdAtParam,
          updatedAt: updatedAtParam,
        )..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);

        return object;
      },
    ),
  };

  return obx_int.ModelDefinition(model, bindings);
}

/// [ChatMessageEntity] entity fields to define ObjectBox queries.
class ChatMessageEntity_ {
  /// See [ChatMessageEntity.id].
  static final id = obx.QueryIntegerProperty<ChatMessageEntity>(
    _entities[0].properties[0],
  );

  /// See [ChatMessageEntity.messageId].
  static final messageId = obx.QueryStringProperty<ChatMessageEntity>(
    _entities[0].properties[1],
  );

  /// See [ChatMessageEntity.conversationKey].
  static final conversationKey = obx.QueryStringProperty<ChatMessageEntity>(
    _entities[0].properties[2],
  );

  /// See [ChatMessageEntity.content].
  static final content = obx.QueryStringProperty<ChatMessageEntity>(
    _entities[0].properties[3],
  );

  /// See [ChatMessageEntity.contentType].
  static final contentType = obx.QueryStringProperty<ChatMessageEntity>(
    _entities[0].properties[4],
  );

  /// See [ChatMessageEntity.createdAt].
  static final createdAt = obx.QueryDateProperty<ChatMessageEntity>(
    _entities[0].properties[5],
  );

  /// See [ChatMessageEntity.origin].
  static final origin = obx.QueryStringProperty<ChatMessageEntity>(
    _entities[0].properties[6],
  );

  /// See [ChatMessageEntity.messageType].
  static final messageType = obx.QueryStringProperty<ChatMessageEntity>(
    _entities[0].properties[7],
  );

  /// See [ChatMessageEntity.jobId].
  static final jobId = obx.QueryStringProperty<ChatMessageEntity>(
    _entities[0].properties[8],
  );

  /// See [ChatMessageEntity.jobNumber].
  static final jobNumber = obx.QueryStringProperty<ChatMessageEntity>(
    _entities[0].properties[9],
  );

  /// See [ChatMessageEntity.read].
  static final read = obx.QueryBooleanProperty<ChatMessageEntity>(
    _entities[0].properties[10],
  );

  /// See [ChatMessageEntity.pendingSync].
  static final pendingSync = obx.QueryBooleanProperty<ChatMessageEntity>(
    _entities[0].properties[11],
  );
}

/// [JobEntity] entity fields to define ObjectBox queries.
class JobEntity_ {
  /// See [JobEntity.id].
  static final id = obx.QueryIntegerProperty<JobEntity>(
    _entities[1].properties[0],
  );

  /// See [JobEntity.jobId].
  static final jobId = obx.QueryStringProperty<JobEntity>(
    _entities[1].properties[1],
  );

  /// See [JobEntity.jobData].
  static final jobData = obx.QueryStringProperty<JobEntity>(
    _entities[1].properties[2],
  );

  /// See [JobEntity.createdAt].
  static final createdAt = obx.QueryDateProperty<JobEntity>(
    _entities[1].properties[3],
  );

  /// See [JobEntity.updatedAt].
  static final updatedAt = obx.QueryDateProperty<JobEntity>(
    _entities[1].properties[4],
  );
}

/// [PhotoEntity] entity fields to define ObjectBox queries.
class PhotoEntity_ {
  /// See [PhotoEntity.id].
  static final id = obx.QueryIntegerProperty<PhotoEntity>(
    _entities[2].properties[0],
  );

  /// See [PhotoEntity.taskId].
  static final taskId = obx.QueryStringProperty<PhotoEntity>(
    _entities[2].properties[1],
  );

  /// See [PhotoEntity.photoIndex].
  static final photoIndex = obx.QueryIntegerProperty<PhotoEntity>(
    _entities[2].properties[2],
  );

  /// See [PhotoEntity.data].
  static final data = obx.QueryStringProperty<PhotoEntity>(
    _entities[2].properties[3],
  );

  /// See [PhotoEntity.createdAt].
  static final createdAt = obx.QueryDateProperty<PhotoEntity>(
    _entities[2].properties[4],
  );
}

/// [QueuedMessageEntity] entity fields to define ObjectBox queries.
class QueuedMessageEntity_ {
  /// See [QueuedMessageEntity.id].
  static final id = obx.QueryIntegerProperty<QueuedMessageEntity>(
    _entities[3].properties[0],
  );

  /// See [QueuedMessageEntity.messageId].
  static final messageId = obx.QueryStringProperty<QueuedMessageEntity>(
    _entities[3].properties[1],
  );

  /// See [QueuedMessageEntity.topic].
  static final topic = obx.QueryStringProperty<QueuedMessageEntity>(
    _entities[3].properties[2],
  );

  /// See [QueuedMessageEntity.payload].
  static final payload = obx.QueryStringProperty<QueuedMessageEntity>(
    _entities[3].properties[3],
  );

  /// See [QueuedMessageEntity.createdAt].
  static final createdAt = obx.QueryDateProperty<QueuedMessageEntity>(
    _entities[3].properties[4],
  );

  /// See [QueuedMessageEntity.retryCount].
  static final retryCount = obx.QueryIntegerProperty<QueuedMessageEntity>(
    _entities[3].properties[5],
  );
}

/// [TaskStatusEntity] entity fields to define ObjectBox queries.
class TaskStatusEntity_ {
  /// See [TaskStatusEntity.id].
  static final id = obx.QueryIntegerProperty<TaskStatusEntity>(
    _entities[4].properties[0],
  );

  /// See [TaskStatusEntity.taskId].
  static final taskId = obx.QueryStringProperty<TaskStatusEntity>(
    _entities[4].properties[1],
  );

  /// See [TaskStatusEntity.completed].
  static final completed = obx.QueryBooleanProperty<TaskStatusEntity>(
    _entities[4].properties[2],
  );

  /// See [TaskStatusEntity.completedAt].
  static final completedAt = obx.QueryDateProperty<TaskStatusEntity>(
    _entities[4].properties[3],
  );

  /// See [TaskStatusEntity.createdAt].
  static final createdAt = obx.QueryDateProperty<TaskStatusEntity>(
    _entities[4].properties[4],
  );

  /// See [TaskStatusEntity.updatedAt].
  static final updatedAt = obx.QueryDateProperty<TaskStatusEntity>(
    _entities[4].properties[5],
  );
}

/// [UserDataEntity] entity fields to define ObjectBox queries.
class UserDataEntity_ {
  /// See [UserDataEntity.id].
  static final id = obx.QueryIntegerProperty<UserDataEntity>(
    _entities[5].properties[0],
  );

  /// See [UserDataEntity.key].
  static final key = obx.QueryStringProperty<UserDataEntity>(
    _entities[5].properties[1],
  );

  /// See [UserDataEntity.value].
  static final value = obx.QueryStringProperty<UserDataEntity>(
    _entities[5].properties[2],
  );

  /// See [UserDataEntity.createdAt].
  static final createdAt = obx.QueryDateProperty<UserDataEntity>(
    _entities[5].properties[3],
  );

  /// See [UserDataEntity.updatedAt].
  static final updatedAt = obx.QueryDateProperty<UserDataEntity>(
    _entities[5].properties[4],
  );
}
