// GENERATED CODE - DO NOT MODIFY BY HAND
// This code was generated by ObjectBox. To update it run the generator again:
// With a Flutter package, run `flutter pub run build_runner build`.
// With a Dart package, run `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'; // generated code can access "internal" functionality
import 'package:objectbox/objectbox.dart';
import 'package:objectbox_flutter_libs/objectbox_flutter_libs.dart';

import 'db/box_etab.dart';
import 'db/box_log.dart';
import 'db/box_photo_competitor.dart';
import 'db/box_photo_typology.dart';
import 'db/box_user.dart';
import 'db/box_visit.dart';
import 'db/box_visit_photo.dart';
import 'db/box_visit_tag.dart';
import 'model.dart';

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

final _entities = <ModelEntity>[
  ModelEntity(
      id: const IdUid(1, 2802681814019499133),
      name: 'Note',
      lastPropertyId: const IdUid(4, 6451339597165131221),
      flags: 0,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 3178873177797362769),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 4285343053028527696),
            name: 'text',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 2606273611209948020),
            name: 'comment',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 6451339597165131221),
            name: 'date',
            type: 10,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(3, 6664528022814238868),
      name: 'User',
      lastPropertyId: const IdUid(6, 1514784951041121129),
      flags: 0,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 4611296599843691135),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 3082719507680383784),
            name: 'photo',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 6869254152255514608),
            name: 'login',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 3830288742147875657),
            name: 'nom',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 1856556503877986423),
            name: 'prenom',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 1514784951041121129),
            name: 'id_utilisateur',
            type: 6,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(4, 4389962693874538546),
      name: 'Log',
      lastPropertyId: const IdUid(7, 4949059821139557407),
      flags: 0,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 3034881956612204559),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 1575574682059681804),
            name: 'type',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 8168339759075122864),
            name: 'date',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 1699927074197883718),
            name: 'module',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 7184817111174936621),
            name: 'libelle',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 6213554048326311571),
            name: 'duree',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 4949059821139557407),
            name: 'uploaded',
            type: 6,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(5, 6220645616537106928),
      name: 'Etab',
      lastPropertyId: const IdUid(9, 4862523104151141465),
      flags: 0,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 2951125380051176697),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 986806885009634082),
            name: 'id_etab',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 2138930560668315243),
            name: 'nom',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 6458474884283325627),
            name: 'mail',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 8380062137599693463),
            name: 'tel',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 5547045221255607235),
            name: 'longitude',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(8, 5768827910047585940),
            name: 'latitude',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(9, 4862523104151141465),
            name: 'url_photo_principale',
            type: 9,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(10, 2779194860339140505),
      name: 'PhotoTypology',
      lastPropertyId: const IdUid(4, 5588276375011055284),
      flags: 0,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 4533312085241813844),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 2320922325597284914),
            name: 'id_photo_typologie',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 1537297388817386361),
            name: 'libelle',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 5588276375011055284),
            name: 'ordre',
            type: 6,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(12, 4500693035615595045),
      name: 'EtabCompetitor',
      lastPropertyId: const IdUid(4, 5330383710454562585),
      flags: 0,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 7961815144802826808),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 5210870817793324298),
            name: 'id_concurrence_lien',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 7222947234243150693),
            name: 'id_etab',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 5330383710454562585),
            name: 'nom',
            type: 9,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(13, 6298506278273268036),
      name: 'VisitPhoto',
      lastPropertyId: const IdUid(13, 3286310216758176958),
      flags: 0,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 1717256666688760598),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 6583457577180129132),
            name: 'id_visite',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 614430257115472469),
            name: 'id_photo_typologie',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 4379833392180668916),
            name: 'image_name',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 5816417858904192200),
            name: 'date_photo',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 1774060819972417032),
            name: 'id_photo_mp4',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 1161534230522136468),
            name: 'photo_privee',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(8, 8622794607160372440),
            name: 'photo_principale',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(9, 2715965548965396457),
            name: 'tags',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(11, 7594245284938827569),
            name: 'id_concurrence_lien',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(13, 3286310216758176958),
            name: 'depuis_galerie',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(14, 8708899666252263604),
      name: 'Visit',
      lastPropertyId: const IdUid(14, 2141854824886685065),
      flags: 0,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 1616706753952341931),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 481724387420447256),
            name: 'id_visite',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 4117089501376875705),
            name: 'date_visite',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 6960359036987777529),
            name: 'date_debut',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 2625279579039264654),
            name: 'date_fin',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 7413956781075545593),
            name: 'date_validation',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 1634711659019811476),
            name: 'type_visite',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(8, 8990646204619539770),
            name: 'title',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(9, 392889911199239462),
            name: 'allDay',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(10, 7419826409064780644),
            name: 'id_distrib_visite',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(11, 4334641330182955845),
            name: 'id_etab',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(12, 9153440695191140990),
            name: 'abandon',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(13, 2729810367696493366),
            name: 'url_photo_principale',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(14, 2141854824886685065),
            name: 'langage',
            type: 9,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(15, 8818692504823914757),
      name: 'VisitTag',
      lastPropertyId: const IdUid(5, 7051299843455307303),
      flags: 0,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 43397073361653900),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 3130658169202818866),
            name: 'id_visite_tag',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 3266967171909331007),
            name: 'id_distrib',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 1055850760280831759),
            name: 'libelle',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 7051299843455307303),
            name: 'langage',
            type: 9,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[])
];

/// Open an ObjectBox store with the model declared in this file.
Future<Store> openStore(
        {String? directory,
        int? maxDBSizeInKB,
        int? fileMode,
        int? maxReaders,
        bool queriesCaseSensitiveDefault = true,
        String? macosApplicationGroup}) async =>
    Store(getObjectBoxModel(),
        directory: directory ?? (await defaultStoreDirectory()).path,
        maxDBSizeInKB: maxDBSizeInKB,
        fileMode: fileMode,
        maxReaders: maxReaders,
        queriesCaseSensitiveDefault: queriesCaseSensitiveDefault,
        macosApplicationGroup: macosApplicationGroup);

/// ObjectBox model definition, pass it to [Store] - Store(getObjectBoxModel())
ModelDefinition getObjectBoxModel() {
  final model = ModelInfo(
      entities: _entities,
      lastEntityId: const IdUid(15, 8818692504823914757),
      lastIndexId: const IdUid(1, 7907819717055295102),
      lastRelationId: const IdUid(0, 0),
      lastSequenceId: const IdUid(0, 0),
      retiredEntityUids: const [
        7401686910042688313,
        1805690312272107423,
        6788844671665652158,
        2910300629980903548,
        8290500625256822711,
        637444607663700174
      ],
      retiredIndexUids: const [7907819717055295102],
      retiredPropertyUids: const [
        402019719780433349,
        2876428622751679696,
        6435857490868115471,
        4582947574501853036,
        103801570610300983,
        1940661113633121688,
        2757780641715705310,
        6494338359539955476,
        5293139139799032553,
        2141346538986140281,
        7877546811840884522,
        3784190804330297742,
        1865824860595482227,
        2904282721431628480,
        6658127353491083480,
        2563846535684494722,
        7447139022474751374,
        2982072387377736709,
        1374846727562410311,
        374091471912277059,
        234947897575384032,
        3602779209059248697,
        5116665990846416843,
        1716626028602523655,
        4568092734700892012,
        539065583624712715,
        7248999677905103482,
        6313899520679425027,
        4752064214129719799,
        319372524127232986,
        783761731187897018,
        4764888137112024855,
        5254234731633944539,
        8500424631546195124,
        307259370424642142,
        3383534011872507610,
        3559563062004847001,
        702894233960499092,
        5734787836187957444,
        3119168728902810585,
        1900114397693432703,
        5831680857919010234,
        6072666250573656763,
        138766887652455581,
        4185186663484548877,
        6166685814637290118,
        2059771745036116529,
        102253757473665009,
        1526411175344533047,
        1603887098520719919,
        427077651567855068,
        7039119413270734559
      ],
      retiredRelationUids: const [],
      modelVersion: 5,
      modelVersionParserMinimum: 5,
      version: 1);

  final bindings = <Type, EntityDefinition>{
    Note: EntityDefinition<Note>(
        model: _entities[0],
        toOneRelations: (Note object) => [],
        toManyRelations: (Note object) => {},
        getId: (Note object) => object.id,
        setId: (Note object, int id) {
          object.id = id;
        },
        objectToFB: (Note object, fb.Builder fbb) {
          final textOffset = fbb.writeString(object.text);
          final commentOffset =
              object.comment == null ? null : fbb.writeString(object.comment!);
          fbb.startTable(5);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, textOffset);
          fbb.addOffset(2, commentOffset);
          fbb.addInt64(3, object.date.millisecondsSinceEpoch);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Note(
              const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 6, ''),
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              comment: const fb.StringReader(asciiOptimization: true)
                  .vTableGetNullable(buffer, rootOffset, 8),
              date: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0)));

          return object;
        }),
    User: EntityDefinition<User>(
        model: _entities[1],
        toOneRelations: (User object) => [],
        toManyRelations: (User object) => {},
        getId: (User object) => object.id,
        setId: (User object, int id) {
          object.id = id;
        },
        objectToFB: (User object, fb.Builder fbb) {
          final photoOffset = fbb.writeString(object.photo);
          final loginOffset = fbb.writeString(object.login);
          final nomOffset = fbb.writeString(object.nom);
          final prenomOffset = fbb.writeString(object.prenom);
          fbb.startTable(7);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, photoOffset);
          fbb.addOffset(2, loginOffset);
          fbb.addOffset(3, nomOffset);
          fbb.addOffset(4, prenomOffset);
          fbb.addInt64(5, object.id_utilisateur);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = User(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              id_utilisateur:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 14, 0),
              login: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 8, ''),
              nom: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 10, ''),
              prenom: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 12, ''),
              photo: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 6, ''));

          return object;
        }),
    Log: EntityDefinition<Log>(
        model: _entities[2],
        toOneRelations: (Log object) => [],
        toManyRelations: (Log object) => {},
        getId: (Log object) => object.id,
        setId: (Log object, int id) {
          object.id = id;
        },
        objectToFB: (Log object, fb.Builder fbb) {
          final typeOffset = fbb.writeString(object.type);
          final moduleOffset = fbb.writeString(object.module);
          final libelleOffset = fbb.writeString(object.libelle);
          fbb.startTable(8);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, typeOffset);
          fbb.addInt64(2, object.date.millisecondsSinceEpoch);
          fbb.addOffset(3, moduleOffset);
          fbb.addOffset(4, libelleOffset);
          fbb.addInt64(5, object.duree);
          fbb.addInt64(6, object.uploaded);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Log(
              const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 6, ''),
              const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 10, ''),
              const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 12, ''),
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 14, 0),
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              date: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0)),
              uploaded:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 16, 0));

          return object;
        }),
    Etab: EntityDefinition<Etab>(
        model: _entities[3],
        toOneRelations: (Etab object) => [],
        toManyRelations: (Etab object) => {},
        getId: (Etab object) => object.id,
        setId: (Etab object, int id) {
          object.id = id;
        },
        objectToFB: (Etab object, fb.Builder fbb) {
          final nomOffset = fbb.writeString(object.nom);
          final mailOffset = fbb.writeString(object.mail);
          final telOffset = fbb.writeString(object.tel);
          final longitudeOffset = fbb.writeString(object.longitude);
          final latitudeOffset = fbb.writeString(object.latitude);
          final url_photo_principaleOffset =
              fbb.writeString(object.url_photo_principale);
          fbb.startTable(10);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.id_etab);
          fbb.addOffset(2, nomOffset);
          fbb.addOffset(3, mailOffset);
          fbb.addOffset(4, telOffset);
          fbb.addOffset(6, longitudeOffset);
          fbb.addOffset(7, latitudeOffset);
          fbb.addOffset(8, url_photo_principaleOffset);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Etab(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              id_etab:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0),
              nom: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 8, ''),
              mail: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 10, ''),
              tel: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 12, ''),
              url_photo_principale:
                  const fb.StringReader(asciiOptimization: true)
                      .vTableGet(buffer, rootOffset, 20, ''),
              longitude: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 16, ''),
              latitude: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 18, ''));

          return object;
        }),
    PhotoTypology: EntityDefinition<PhotoTypology>(
        model: _entities[4],
        toOneRelations: (PhotoTypology object) => [],
        toManyRelations: (PhotoTypology object) => {},
        getId: (PhotoTypology object) => object.id,
        setId: (PhotoTypology object, int id) {
          object.id = id;
        },
        objectToFB: (PhotoTypology object, fb.Builder fbb) {
          final libelleOffset = fbb.writeString(object.libelle);
          fbb.startTable(5);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.id_photo_typologie);
          fbb.addOffset(2, libelleOffset);
          fbb.addInt64(3, object.ordre);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = PhotoTypology(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              id_photo_typologie:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0),
              libelle: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 8, ''),
              ordre:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0));

          return object;
        }),
    EtabCompetitor: EntityDefinition<EtabCompetitor>(
        model: _entities[5],
        toOneRelations: (EtabCompetitor object) => [],
        toManyRelations: (EtabCompetitor object) => {},
        getId: (EtabCompetitor object) => object.id,
        setId: (EtabCompetitor object, int id) {
          object.id = id;
        },
        objectToFB: (EtabCompetitor object, fb.Builder fbb) {
          final nomOffset = fbb.writeString(object.nom);
          fbb.startTable(5);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.id_concurrence_lien);
          fbb.addInt64(2, object.id_etab);
          fbb.addOffset(3, nomOffset);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = EtabCompetitor(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              id_concurrence_lien:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0),
              id_etab:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0),
              nom: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 10, ''));

          return object;
        }),
    VisitPhoto: EntityDefinition<VisitPhoto>(
        model: _entities[6],
        toOneRelations: (VisitPhoto object) => [],
        toManyRelations: (VisitPhoto object) => {},
        getId: (VisitPhoto object) => object.id,
        setId: (VisitPhoto object, int id) {
          object.id = id;
        },
        objectToFB: (VisitPhoto object, fb.Builder fbb) {
          final image_nameOffset = fbb.writeString(object.image_name);
          final tagsOffset = fbb.writeString(object.tags);
          fbb.startTable(14);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.id_visite);
          fbb.addInt64(2, object.id_photo_typologie);
          fbb.addOffset(3, image_nameOffset);
          fbb.addInt64(4, object.date_photo.millisecondsSinceEpoch);
          fbb.addInt64(5, object.id_photo_mp4);
          fbb.addInt64(6, object.photo_privee);
          fbb.addInt64(7, object.photo_principale);
          fbb.addOffset(8, tagsOffset);
          fbb.addInt64(10, object.id_concurrence_lien);
          fbb.addBool(12, object.depuis_galerie);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = VisitPhoto(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              id_visite:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0),
              id_photo_typologie:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0),
              image_name: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 10, ''),
              id_photo_mp4:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 14, 0),
              photo_privee:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 16, 0),
              photo_principale:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0),
              tags: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 20, ''),
              date_photo: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0)),
              id_concurrence_lien:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0),
              depuis_galerie: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 28, false));

          return object;
        }),
    Visit: EntityDefinition<Visit>(
        model: _entities[7],
        toOneRelations: (Visit object) => [],
        toManyRelations: (Visit object) => {},
        getId: (Visit object) => object.id,
        setId: (Visit object, int id) {
          object.id = id;
        },
        objectToFB: (Visit object, fb.Builder fbb) {
          final type_visiteOffset = fbb.writeString(object.type_visite);
          final titleOffset = fbb.writeString(object.title);
          final url_photo_principaleOffset =
              fbb.writeString(object.url_photo_principale);
          final langageOffset = fbb.writeString(object.langage);
          fbb.startTable(15);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.id_visite);
          fbb.addInt64(2, object.date_visite.millisecondsSinceEpoch);
          fbb.addInt64(3, object.date_debut.millisecondsSinceEpoch);
          fbb.addInt64(4, object.date_fin?.millisecondsSinceEpoch);
          fbb.addInt64(5, object.date_validation?.millisecondsSinceEpoch);
          fbb.addOffset(6, type_visiteOffset);
          fbb.addOffset(7, titleOffset);
          fbb.addBool(8, object.allDay);
          fbb.addInt64(9, object.id_distrib_visite);
          fbb.addInt64(10, object.id_etab);
          fbb.addInt64(11, object.abandon);
          fbb.addOffset(12, url_photo_principaleOffset);
          fbb.addOffset(13, langageOffset);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);
          final date_finValue =
              const fb.Int64Reader().vTableGetNullable(buffer, rootOffset, 12);
          final date_validationValue =
              const fb.Int64Reader().vTableGetNullable(buffer, rootOffset, 14);
          final object = Visit(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              id_visite:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0),
              date_visite: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0)),
              date_debut: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0)),
              date_fin: date_finValue == null
                  ? null
                  : DateTime.fromMillisecondsSinceEpoch(date_finValue),
              date_validation: date_validationValue == null
                  ? null
                  : DateTime.fromMillisecondsSinceEpoch(date_validationValue),
              type_visite: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 16, ''),
              title: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 18, ''),
              allDay: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 20, false),
              id_distrib_visite:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0),
              id_etab: const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0),
              abandon: const fb.Int64Reader().vTableGet(buffer, rootOffset, 26, 0),
              url_photo_principale: const fb.StringReader(asciiOptimization: true).vTableGet(buffer, rootOffset, 28, ''),
              langage: const fb.StringReader(asciiOptimization: true).vTableGet(buffer, rootOffset, 30, ''));

          return object;
        }),
    VisitTag: EntityDefinition<VisitTag>(
        model: _entities[8],
        toOneRelations: (VisitTag object) => [],
        toManyRelations: (VisitTag object) => {},
        getId: (VisitTag object) => object.id,
        setId: (VisitTag object, int id) {
          object.id = id;
        },
        objectToFB: (VisitTag object, fb.Builder fbb) {
          final libelleOffset = fbb.writeString(object.libelle);
          final langageOffset = fbb.writeString(object.langage);
          fbb.startTable(6);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.id_visite_tag);
          fbb.addInt64(2, object.id_distrib);
          fbb.addOffset(3, libelleOffset);
          fbb.addOffset(4, langageOffset);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = VisitTag(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              id_visite_tag:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0),
              id_distrib:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0),
              libelle: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 10, ''),
              langage: const fb.StringReader(asciiOptimization: true)
                  .vTableGet(buffer, rootOffset, 12, ''));

          return object;
        })
  };

  return ModelDefinition(model, bindings);
}

/// [Note] entity fields to define ObjectBox queries.
class Note_ {
  /// see [Note.id]
  static final id = QueryIntegerProperty<Note>(_entities[0].properties[0]);

  /// see [Note.text]
  static final text = QueryStringProperty<Note>(_entities[0].properties[1]);

  /// see [Note.comment]
  static final comment = QueryStringProperty<Note>(_entities[0].properties[2]);

  /// see [Note.date]
  static final date = QueryIntegerProperty<Note>(_entities[0].properties[3]);
}

/// [User] entity fields to define ObjectBox queries.
class User_ {
  /// see [User.id]
  static final id = QueryIntegerProperty<User>(_entities[1].properties[0]);

  /// see [User.photo]
  static final photo = QueryStringProperty<User>(_entities[1].properties[1]);

  /// see [User.login]
  static final login = QueryStringProperty<User>(_entities[1].properties[2]);

  /// see [User.nom]
  static final nom = QueryStringProperty<User>(_entities[1].properties[3]);

  /// see [User.prenom]
  static final prenom = QueryStringProperty<User>(_entities[1].properties[4]);

  /// see [User.id_utilisateur]
  static final id_utilisateur =
      QueryIntegerProperty<User>(_entities[1].properties[5]);
}

/// [Log] entity fields to define ObjectBox queries.
class Log_ {
  /// see [Log.id]
  static final id = QueryIntegerProperty<Log>(_entities[2].properties[0]);

  /// see [Log.type]
  static final type = QueryStringProperty<Log>(_entities[2].properties[1]);

  /// see [Log.date]
  static final date = QueryIntegerProperty<Log>(_entities[2].properties[2]);

  /// see [Log.module]
  static final module = QueryStringProperty<Log>(_entities[2].properties[3]);

  /// see [Log.libelle]
  static final libelle = QueryStringProperty<Log>(_entities[2].properties[4]);

  /// see [Log.duree]
  static final duree = QueryIntegerProperty<Log>(_entities[2].properties[5]);

  /// see [Log.uploaded]
  static final uploaded = QueryIntegerProperty<Log>(_entities[2].properties[6]);
}

/// [Etab] entity fields to define ObjectBox queries.
class Etab_ {
  /// see [Etab.id]
  static final id = QueryIntegerProperty<Etab>(_entities[3].properties[0]);

  /// see [Etab.id_etab]
  static final id_etab = QueryIntegerProperty<Etab>(_entities[3].properties[1]);

  /// see [Etab.nom]
  static final nom = QueryStringProperty<Etab>(_entities[3].properties[2]);

  /// see [Etab.mail]
  static final mail = QueryStringProperty<Etab>(_entities[3].properties[3]);

  /// see [Etab.tel]
  static final tel = QueryStringProperty<Etab>(_entities[3].properties[4]);

  /// see [Etab.longitude]
  static final longitude =
      QueryStringProperty<Etab>(_entities[3].properties[5]);

  /// see [Etab.latitude]
  static final latitude = QueryStringProperty<Etab>(_entities[3].properties[6]);

  /// see [Etab.url_photo_principale]
  static final url_photo_principale =
      QueryStringProperty<Etab>(_entities[3].properties[7]);
}

/// [PhotoTypology] entity fields to define ObjectBox queries.
class PhotoTypology_ {
  /// see [PhotoTypology.id]
  static final id =
      QueryIntegerProperty<PhotoTypology>(_entities[4].properties[0]);

  /// see [PhotoTypology.id_photo_typologie]
  static final id_photo_typologie =
      QueryIntegerProperty<PhotoTypology>(_entities[4].properties[1]);

  /// see [PhotoTypology.libelle]
  static final libelle =
      QueryStringProperty<PhotoTypology>(_entities[4].properties[2]);

  /// see [PhotoTypology.ordre]
  static final ordre =
      QueryIntegerProperty<PhotoTypology>(_entities[4].properties[3]);
}

/// [EtabCompetitor] entity fields to define ObjectBox queries.
class EtabCompetitor_ {
  /// see [EtabCompetitor.id]
  static final id =
      QueryIntegerProperty<EtabCompetitor>(_entities[5].properties[0]);

  /// see [EtabCompetitor.id_concurrence_lien]
  static final id_concurrence_lien =
      QueryIntegerProperty<EtabCompetitor>(_entities[5].properties[1]);

  /// see [EtabCompetitor.id_etab]
  static final id_etab =
      QueryIntegerProperty<EtabCompetitor>(_entities[5].properties[2]);

  /// see [EtabCompetitor.nom]
  static final nom =
      QueryStringProperty<EtabCompetitor>(_entities[5].properties[3]);
}

/// [VisitPhoto] entity fields to define ObjectBox queries.
class VisitPhoto_ {
  /// see [VisitPhoto.id]
  static final id =
      QueryIntegerProperty<VisitPhoto>(_entities[6].properties[0]);

  /// see [VisitPhoto.id_visite]
  static final id_visite =
      QueryIntegerProperty<VisitPhoto>(_entities[6].properties[1]);

  /// see [VisitPhoto.id_photo_typologie]
  static final id_photo_typologie =
      QueryIntegerProperty<VisitPhoto>(_entities[6].properties[2]);

  /// see [VisitPhoto.image_name]
  static final image_name =
      QueryStringProperty<VisitPhoto>(_entities[6].properties[3]);

  /// see [VisitPhoto.date_photo]
  static final date_photo =
      QueryIntegerProperty<VisitPhoto>(_entities[6].properties[4]);

  /// see [VisitPhoto.id_photo_mp4]
  static final id_photo_mp4 =
      QueryIntegerProperty<VisitPhoto>(_entities[6].properties[5]);

  /// see [VisitPhoto.photo_privee]
  static final photo_privee =
      QueryIntegerProperty<VisitPhoto>(_entities[6].properties[6]);

  /// see [VisitPhoto.photo_principale]
  static final photo_principale =
      QueryIntegerProperty<VisitPhoto>(_entities[6].properties[7]);

  /// see [VisitPhoto.tags]
  static final tags =
      QueryStringProperty<VisitPhoto>(_entities[6].properties[8]);

  /// see [VisitPhoto.id_concurrence_lien]
  static final id_concurrence_lien =
      QueryIntegerProperty<VisitPhoto>(_entities[6].properties[9]);

  /// see [VisitPhoto.depuis_galerie]
  static final depuis_galerie =
      QueryBooleanProperty<VisitPhoto>(_entities[6].properties[10]);
}

/// [Visit] entity fields to define ObjectBox queries.
class Visit_ {
  /// see [Visit.id]
  static final id = QueryIntegerProperty<Visit>(_entities[7].properties[0]);

  /// see [Visit.id_visite]
  static final id_visite =
      QueryIntegerProperty<Visit>(_entities[7].properties[1]);

  /// see [Visit.date_visite]
  static final date_visite =
      QueryIntegerProperty<Visit>(_entities[7].properties[2]);

  /// see [Visit.date_debut]
  static final date_debut =
      QueryIntegerProperty<Visit>(_entities[7].properties[3]);

  /// see [Visit.date_fin]
  static final date_fin =
      QueryIntegerProperty<Visit>(_entities[7].properties[4]);

  /// see [Visit.date_validation]
  static final date_validation =
      QueryIntegerProperty<Visit>(_entities[7].properties[5]);

  /// see [Visit.type_visite]
  static final type_visite =
      QueryStringProperty<Visit>(_entities[7].properties[6]);

  /// see [Visit.title]
  static final title = QueryStringProperty<Visit>(_entities[7].properties[7]);

  /// see [Visit.allDay]
  static final allDay = QueryBooleanProperty<Visit>(_entities[7].properties[8]);

  /// see [Visit.id_distrib_visite]
  static final id_distrib_visite =
      QueryIntegerProperty<Visit>(_entities[7].properties[9]);

  /// see [Visit.id_etab]
  static final id_etab =
      QueryIntegerProperty<Visit>(_entities[7].properties[10]);

  /// see [Visit.abandon]
  static final abandon =
      QueryIntegerProperty<Visit>(_entities[7].properties[11]);

  /// see [Visit.url_photo_principale]
  static final url_photo_principale =
      QueryStringProperty<Visit>(_entities[7].properties[12]);

  /// see [Visit.langage]
  static final langage =
      QueryStringProperty<Visit>(_entities[7].properties[13]);
}

/// [VisitTag] entity fields to define ObjectBox queries.
class VisitTag_ {
  /// see [VisitTag.id]
  static final id = QueryIntegerProperty<VisitTag>(_entities[8].properties[0]);

  /// see [VisitTag.id_visite_tag]
  static final id_visite_tag =
      QueryIntegerProperty<VisitTag>(_entities[8].properties[1]);

  /// see [VisitTag.id_distrib]
  static final id_distrib =
      QueryIntegerProperty<VisitTag>(_entities[8].properties[2]);

  /// see [VisitTag.libelle]
  static final libelle =
      QueryStringProperty<VisitTag>(_entities[8].properties[3]);

  /// see [VisitTag.langage]
  static final langage =
      QueryStringProperty<VisitTag>(_entities[8].properties[4]);
}
