content: // 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 'models/brief_ai_tools/branch_chat/branch_chat_message.dart';
  import 'models/brief_ai_tools/branch_chat/branch_chat_session.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, 2148325011734090399),
        name: 'BranchChatMessage',
        lastPropertyId: const obx_int.IdUid(20, 8767197987604157500),
        flags: 0,
        properties: <obx_int.ModelProperty>[
          obx_int.ModelProperty(
              id: const obx_int.IdUid(1, 7735779140052059594),
              name: 'id',
              type: 6,
              flags: 129),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(2, 8330523657384883865),
              name: 'messageId',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(3, 3222625871562176545),
              name: 'role',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(4, 8210956497812897981),
              name: 'content',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(5, 6645952193752745637),
              name: 'createTime',
              type: 10,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(6, 6903517836749680514),
              name: 'reasoningContent',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(7, 1862822388591118045),
              name: 'thinkingDuration',
              type: 6,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(8, 3463051754764952953),
              name: 'contentVoicePath',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(9, 8377933615058986970),
              name: 'imagesUrl',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(10, 939475307446426764),
              name: 'videosUrl',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(11, 5958937354868297115),
              name: 'referencesJson',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(12, 7163626883465253620),
              name: 'promptTokens',
              type: 6,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(13, 9054939416930255068),
              name: 'completionTokens',
              type: 6,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(14, 2114417148504561356),
              name: 'totalTokens',
              type: 6,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(15, 1318784377341401830),
              name: 'modelLabel',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(16, 2724089686478491000),
              name: 'parentId',
              type: 11,
              flags: 520,
              indexId: const obx_int.IdUid(1, 1544726077037522817),
              relationTarget: 'BranchChatMessage'),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(17, 5656319411491416217),
              name: 'sessionId',
              type: 11,
              flags: 520,
              indexId: const obx_int.IdUid(2, 5804341374734258898),
              relationTarget: 'BranchChatSession'),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(18, 4645901067573490601),
              name: 'branchIndex',
              type: 6,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(19, 2178242977684240272),
              name: 'depth',
              type: 6,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(20, 8767197987604157500),
              name: 'branchPath',
              type: 9,
              flags: 0)
        ],
        relations: <obx_int.ModelRelation>[],
        backlinks: <obx_int.ModelBacklink>[
          obx_int.ModelBacklink(
              name: 'children',
              srcEntity: 'BranchChatMessage',
              srcField: 'parent')
        ]),
    obx_int.ModelEntity(
        id: const obx_int.IdUid(2, 6884003956670739939),
        name: 'BranchChatSession',
        lastPropertyId: const obx_int.IdUid(6, 6447203546370324910),
        flags: 0,
        properties: <obx_int.ModelProperty>[
          obx_int.ModelProperty(
              id: const obx_int.IdUid(1, 5162690438040318376),
              name: 'id',
              type: 6,
              flags: 1),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(2, 1708745587917046560),
              name: 'title',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(3, 4266890316782273125),
              name: 'createTime',
              type: 10,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(4, 7358436287911324576),
              name: 'updateTime',
              type: 10,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(5, 3183520635625551014),
              name: 'llmSpecJson',
              type: 9,
              flags: 0),
          obx_int.ModelProperty(
              id: const obx_int.IdUid(6, 6447203546370324910),
              name: 'modelTypeStr',
              type: 9,
              flags: 0)
        ],
        relations: <obx_int.ModelRelation>[],
        backlinks: <obx_int.ModelBacklink>[
          obx_int.ModelBacklink(
              name: 'messages',
              srcEntity: 'BranchChatMessage',
              srcField: 'session')
        ])
  ];
  
  /// 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(2, 6884003956670739939),
        lastIndexId: const obx_int.IdUid(2, 5804341374734258898),
        lastRelationId: const obx_int.IdUid(0, 0),
        lastSequenceId: const obx_int.IdUid(0, 0),
        retiredEntityUids: const [],
        retiredIndexUids: const [],
        retiredPropertyUids: const [],
        retiredRelationUids: const [],
        modelVersion: 5,
        modelVersionParserMinimum: 5,
        version: 1);
  
    final bindings = <Type, obx_int.EntityDefinition>{
      BranchChatMessage: obx_int.EntityDefinition<BranchChatMessage>(
          model: _entities[0],
          toOneRelations: (BranchChatMessage object) =>
              [object.parent, object.session],
          toManyRelations: (BranchChatMessage object) => {
                obx_int.RelInfo<BranchChatMessage>.toOneBacklink(16, object.id,
                        (BranchChatMessage srcObject) => srcObject.parent):
                    object.children
              },
          getId: (BranchChatMessage object) => object.id,
          setId: (BranchChatMessage object, int id) {
            object.id = id;
          },
          objectToFB: (BranchChatMessage object, fb.Builder fbb) {
            final messageIdOffset = fbb.writeString(object.messageId);
            final roleOffset = fbb.writeString(object.role);
            final contentOffset = fbb.writeString(object.content);
            final reasoningContentOffset = object.reasoningContent == null
                ? null
                : fbb.writeString(object.reasoningContent!);
            final contentVoicePathOffset = object.contentVoicePath == null
                ? null
                : fbb.writeString(object.contentVoicePath!);
            final imagesUrlOffset = object.imagesUrl == null
                ? null
                : fbb.writeString(object.imagesUrl!);
            final videosUrlOffset = object.videosUrl == null
                ? null
                : fbb.writeString(object.videosUrl!);
            final referencesJsonOffset = object.referencesJson == null
                ? null
                : fbb.writeString(object.referencesJson!);
            final modelLabelOffset = object.modelLabel == null
                ? null
                : fbb.writeString(object.modelLabel!);
            final branchPathOffset = fbb.writeString(object.branchPath);
            fbb.startTable(21);
            fbb.addInt64(0, object.id);
            fbb.addOffset(1, messageIdOffset);
            fbb.addOffset(2, roleOffset);
            fbb.addOffset(3, contentOffset);
            fbb.addInt64(4, object.createTime.millisecondsSinceEpoch);
            fbb.addOffset(5, reasoningContentOffset);
            fbb.addInt64(6, object.thinkingDuration);
            fbb.addOffset(7, contentVoicePathOffset);
            fbb.addOffset(8, imagesUrlOffset);
            fbb.addOffset(9, videosUrlOffset);
            fbb.addOffset(10, referencesJsonOffset);
            fbb.addInt64(11, object.promptTokens);
            fbb.addInt64(12, object.completionTokens);
            fbb.addInt64(13, object.totalTokens);
            fbb.addOffset(14, modelLabelOffset);
            fbb.addInt64(15, object.parent.targetId);
            fbb.addInt64(16, object.session.targetId);
            fbb.addInt64(17, object.branchIndex);
            fbb.addInt64(18, object.depth);
            fbb.addOffset(19, branchPathOffset);
            fbb.finish(fbb.endTable());
            return object.id;
          },
          objectFromFB: (obx.Store store, ByteData fbData) {
            final buffer = fb.BufferContext(fbData);
            final rootOffset = buffer.derefObject(0);
            final idParam =
                const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);
            final messageIdParam = const fb.StringReader(asciiOptimization: true)
                .vTableGet(buffer, rootOffset, 6, '');
            final roleParam = const fb.StringReader(asciiOptimization: true)
                .vTableGet(buffer, rootOffset, 8, '');
            final contentParam = const fb.StringReader(asciiOptimization: true)
                .vTableGet(buffer, rootOffset, 10, '');
            final createTimeParam = DateTime.fromMillisecondsSinceEpoch(
                const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0));
            final branchIndexParam =
                const fb.Int64Reader().vTableGet(buffer, rootOffset, 38, 0);
            final depthParam =
                const fb.Int64Reader().vTableGet(buffer, rootOffset, 40, 0);
            final branchPathParam = const fb.StringReader(asciiOptimization: true)
                .vTableGet(buffer, rootOffset, 42, '');
            final reasoningContentParam =
                const fb.StringReader(asciiOptimization: true)
                    .vTableGetNullable(buffer, rootOffset, 14);
            final thinkingDurationParam =
                const fb.Int64Reader().vTableGetNullable(buffer, rootOffset, 16);
            final contentVoicePathParam =
                const fb.StringReader(asciiOptimization: true)
                    .vTableGetNullable(buffer, rootOffset, 18);
            final imagesUrlParam = const fb.StringReader(asciiOptimization: true)
                .vTableGetNullable(buffer, rootOffset, 20);
            final videosUrlParam = const fb.StringReader(asciiOptimization: true)
                .vTableGetNullable(buffer, rootOffset, 22);
            final promptTokensParam =
                const fb.Int64Reader().vTableGetNullable(buffer, rootOffset, 26);
            final completionTokensParam =
                const fb.Int64Reader().vTableGetNullable(buffer, rootOffset, 28);
            final totalTokensParam =
                const fb.Int64Reader().vTableGetNullable(buffer, rootOffset, 30);
            final modelLabelParam = const fb.StringReader(asciiOptimization: true)
                .vTableGetNullable(buffer, rootOffset, 32);
            final object = BranchChatMessage(
                id: idParam,
                messageId: messageIdParam,
                role: roleParam,
                content: contentParam,
                createTime: createTimeParam,
                branchIndex: branchIndexParam,
                depth: depthParam,
                branchPath: branchPathParam,
                reasoningContent: reasoningContentParam,
                thinkingDuration: thinkingDurationParam,
                contentVoicePath: contentVoicePathParam,
                imagesUrl: imagesUrlParam,
                videosUrl: videosUrlParam,
                promptTokens: promptTokensParam,
                completionTokens: completionTokensParam,
                totalTokens: totalTokensParam,
                modelLabel: modelLabelParam)
              ..referencesJson = const fb.StringReader(asciiOptimization: true)
                  .vTableGetNullable(buffer, rootOffset, 24);
            object.parent.targetId =
                const fb.Int64Reader().vTableGet(buffer, rootOffset, 34, 0);
            object.parent.attach(store);
            object.session.targetId =
                const fb.Int64Reader().vTableGet(buffer, rootOffset, 36, 0);
            object.session.attach(store);
            obx_int.InternalToManyAccess.setRelInfo<BranchChatMessage>(
                object.children,
                store,
                obx_int.RelInfo<BranchChatMessage>.toOneBacklink(16, object.id,
                    (BranchChatMessage srcObject) => srcObject.parent));
            return object;
          }),
      BranchChatSession: obx_int.EntityDefinition<BranchChatSession>(
          model: _entities[1],
          toOneRelations: (BranchChatSession object) => [],
          toManyRelations: (BranchChatSession object) => {
                obx_int.RelInfo<BranchChatMessage>.toOneBacklink(17, object.id,
                        (BranchChatMessage srcObject) => srcObject.session):
                    object.messages
              },
          getId: (BranchChatSession object) => object.id,
          setId: (BranchChatSession object, int id) {
            object.id = id;
          },
          objectToFB: (BranchChatSession object, fb.Builder fbb) {
            final titleOffset = fbb.writeString(object.title);
            final llmSpecJsonOffset = object.llmSpecJson == null
                ? null
                : fbb.writeString(object.llmSpecJson!);
            final modelTypeStrOffset = object.modelTypeStr == null
                ? null
                : fbb.writeString(object.modelTypeStr!);
            fbb.startTable(7);
            fbb.addInt64(0, object.id);
            fbb.addOffset(1, titleOffset);
            fbb.addInt64(2, object.createTime.millisecondsSinceEpoch);
            fbb.addInt64(3, object.updateTime.millisecondsSinceEpoch);
            fbb.addOffset(4, llmSpecJsonOffset);
            fbb.addOffset(5, modelTypeStrOffset);
            fbb.finish(fbb.endTable());
            return object.id;
          },
          objectFromFB: (obx.Store store, ByteData fbData) {
            final buffer = fb.BufferContext(fbData);
            final rootOffset = buffer.derefObject(0);
            final idParam =
                const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);
            final titleParam = const fb.StringReader(asciiOptimization: true)
                .vTableGet(buffer, rootOffset, 6, '');
            final createTimeParam = DateTime.fromMillisecondsSinceEpoch(
                const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0));
            final updateTimeParam = DateTime.fromMillisecondsSinceEpoch(
                const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0));
            final llmSpecJsonParam =
                const fb.StringReader(asciiOptimization: true)
                    .vTableGetNullable(buffer, rootOffset, 12);
            final modelTypeStrParam =
                const fb.StringReader(asciiOptimization: true)
                    .vTableGetNullable(buffer, rootOffset, 14);
            final object = BranchChatSession(
                id: idParam,
                title: titleParam,
                createTime: createTimeParam,
                updateTime: updateTimeParam,
                llmSpecJson: llmSpecJsonParam,
                modelTypeStr: modelTypeStrParam);
            obx_int.InternalToManyAccess.setRelInfo<BranchChatSession>(
                object.messages,
                store,
                obx_int.RelInfo<BranchChatMessage>.toOneBacklink(17, object.id,
                    (BranchChatMessage srcObject) => srcObject.session));
            return object;
          })
    };
  
    return obx_int.ModelDefinition(model, bindings);
  }
  
  /// [BranchChatMessage] entity fields to define ObjectBox queries.
  class BranchChatMessage_ {
    /// See [BranchChatMessage.id].
    static final id =
        obx.QueryIntegerProperty<BranchChatMessage>(_entities[0].properties[0]);
  
    /// See [BranchChatMessage.messageId].
    static final messageId =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[1]);
  
    /// See [BranchChatMessage.role].
    static final role =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[2]);
  
    /// See [BranchChatMessage.content].
    static final content =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[3]);
  
    /// See [BranchChatMessage.createTime].
    static final createTime =
        obx.QueryDateProperty<BranchChatMessage>(_entities[0].properties[4]);
  
    /// See [BranchChatMessage.reasoningContent].
    static final reasoningContent =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[5]);
  
    /// See [BranchChatMessage.thinkingDuration].
    static final thinkingDuration =
        obx.QueryIntegerProperty<BranchChatMessage>(_entities[0].properties[6]);
  
    /// See [BranchChatMessage.contentVoicePath].
    static final contentVoicePath =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[7]);
  
    /// See [BranchChatMessage.imagesUrl].
    static final imagesUrl =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[8]);
  
    /// See [BranchChatMessage.videosUrl].
    static final videosUrl =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[9]);
  
    /// See [BranchChatMessage.referencesJson].
    static final referencesJson =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[10]);
  
    /// See [BranchChatMessage.promptTokens].
    static final promptTokens =
        obx.QueryIntegerProperty<BranchChatMessage>(_entities[0].properties[11]);
  
    /// See [BranchChatMessage.completionTokens].
    static final completionTokens =
        obx.QueryIntegerProperty<BranchChatMessage>(_entities[0].properties[12]);
  
    /// See [BranchChatMessage.totalTokens].
    static final totalTokens =
        obx.QueryIntegerProperty<BranchChatMessage>(_entities[0].properties[13]);
  
    /// See [BranchChatMessage.modelLabel].
    static final modelLabel =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[14]);
  
    /// See [BranchChatMessage.parent].
    static final parent =
        obx.QueryRelationToOne<BranchChatMessage, BranchChatMessage>(
            _entities[0].properties[15]);
  
    /// See [BranchChatMessage.session].
    static final session =
        obx.QueryRelationToOne<BranchChatMessage, BranchChatSession>(
            _entities[0].properties[16]);
  
    /// See [BranchChatMessage.branchIndex].
    static final branchIndex =
        obx.QueryIntegerProperty<BranchChatMessage>(_entities[0].properties[17]);
  
    /// See [BranchChatMessage.depth].
    static final depth =
        obx.QueryIntegerProperty<BranchChatMessage>(_entities[0].properties[18]);
  
    /// See [BranchChatMessage.branchPath].
    static final branchPath =
        obx.QueryStringProperty<BranchChatMessage>(_entities[0].properties[19]);
  
    /// see [BranchChatMessage.children]
    static final children =
        obx.QueryBacklinkToMany<BranchChatMessage, BranchChatMessage>(
            BranchChatMessage_.parent);
  }
  
  /// [BranchChatSession] entity fields to define ObjectBox queries.
  class BranchChatSession_ {
    /// See [BranchChatSession.id].
    static final id =
        obx.QueryIntegerProperty<BranchChatSession>(_entities[1].properties[0]);
  
    /// See [BranchChatSession.title].
    static final title =
        obx.QueryStringProperty<BranchChatSession>(_entities[1].properties[1]);
  
    /// See [BranchChatSession.createTime].
    static final createTime =
        obx.QueryDateProperty<BranchChatSession>(_entities[1].properties[2]);
  
    /// See [BranchChatSession.updateTime].
    static final updateTime =
        obx.QueryDateProperty<BranchChatSession>(_entities[1].properties[3]);
  
    /// See [BranchChatSession.llmSpecJson].
    static final llmSpecJson =
        obx.QueryStringProperty<BranchChatSession>(_entities[1].properties[4]);
  
    /// See [BranchChatSession.modelTypeStr].
    static final modelTypeStr =
        obx.QueryStringProperty<BranchChatSession>(_entities[1].properties[5]);
  
    /// see [BranchChatSession.messages]
    static final messages =
        obx.QueryBacklinkToMany<BranchChatMessage, BranchChatSession>(
            BranchChatMessage_.session);
  }
  