// GENERATED CODE - DO NOT MODIFY BY HAND

// ignore_for_file: camel_case_types

import 'dart:typed_data';

import 'package:objectbox/flatbuffers/flat_buffers.dart' as fb;
import 'package:objectbox/internal.dart'; // generated code can access "internal" functionality
import 'package:objectbox/objectbox.dart';
import 'package:objectbox_sync_flutter_libs/objectbox_sync_flutter_libs.dart';

import 'models/accuracy.dart';
import 'models/basal.dart';
import 'models/basal_profile.dart';
import 'models/bolus.dart';
import 'models/bolus_profile.dart';
import 'models/glucose_target.dart';
import 'models/ingredient.dart';
import 'models/log_bolus.dart';
import 'models/log_entry.dart';
import 'models/log_event.dart';
import 'models/log_event_type.dart';
import 'models/log_meal.dart';
import 'models/meal.dart';
import 'models/meal_category.dart';
import 'models/meal_portion_type.dart';
import 'models/meal_source.dart';
import 'models/recipe.dart';
import 'models/settings.dart';

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

final _entities = <ModelEntity>[
  ModelEntity(
      id: const IdUid(2, 1467758525778521891),
      name: 'Basal',
      lastPropertyId: const IdUid(6, 3409466778841164684),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 4281816825522738642),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 4009055523978371979),
            name: 'startTime',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 4023788962759622162),
            name: 'endTime',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 7477362011547874977),
            name: 'units',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 3908367275335317130),
            name: 'basalProfileId',
            type: 11,
            flags: 520,
            indexId: const IdUid(1, 8279975749291974737),
            relationTarget: 'BasalProfile'),
        ModelProperty(
            id: const IdUid(6, 3409466778841164684),
            name: 'deleted',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(3, 3613736032926903785),
      name: 'BasalProfile',
      lastPropertyId: const IdUid(5, 8140071977687660397),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 353771983641472117),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 3551375678911240048),
            name: 'name',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 8867907906620144161),
            name: 'active',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 6719547342639071472),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 8140071977687660397),
            name: 'deleted',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(4, 3417770529060202389),
      name: 'Bolus',
      lastPropertyId: const IdUid(9, 7440090146687096977),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 8141647919190345775),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 5125398907947855021),
            name: 'startTime',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 4407971823097024949),
            name: 'endTime',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 2189083553538343203),
            name: 'units',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 1743412468359480761),
            name: 'carbs',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 6172996718025500229),
            name: 'mgPerDl',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 5407916209359443797),
            name: 'mmolPerL',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(8, 7679622918986671917),
            name: 'bolusProfileId',
            type: 11,
            flags: 520,
            indexId: const IdUid(2, 1936045997906240691),
            relationTarget: 'BolusProfile'),
        ModelProperty(
            id: const IdUid(9, 7440090146687096977),
            name: 'deleted',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(5, 8812452529027052317),
      name: 'BolusProfile',
      lastPropertyId: const IdUid(5, 8082994824481464395),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 4233863196673391978),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 1213341428301430611),
            name: 'name',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 8255411532896152868),
            name: 'active',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 3030493484602726372),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 8082994824481464395),
            name: 'deleted',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(6, 752131069307970560),
      name: 'LogEntry',
      lastPropertyId: const IdUid(10, 2505303363495348118),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 5528657304180237933),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 2227745196606148370),
            name: 'time',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 6679353626542225935),
            name: 'mgPerDl',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 7624273251826662730),
            name: 'mmolPerL',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(8, 6492273995038150006),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(9, 1692732373071965573),
            name: 'deleted',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(10, 2505303363495348118),
            name: 'glucoseTrend',
            type: 8,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(7, 4303325892753185970),
      name: 'LogEvent',
      lastPropertyId: const IdUid(12, 3041952167628926163),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 6648501734758557663),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 4564145770032506132),
            name: 'time',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 1956029073259700909),
            name: 'endTime',
            type: 10,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 289190785515853098),
            name: 'hasEndTime',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 3285255817130847007),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(8, 2514297323717317184),
            name: 'eventTypeId',
            type: 11,
            flags: 520,
            indexId: const IdUid(5, 1417691902662024007),
            relationTarget: 'LogEventType'),
        ModelProperty(
            id: const IdUid(9, 8477413048577624801),
            name: 'deleted',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(10, 987218091728524211),
            name: 'bolusProfileId',
            type: 11,
            flags: 520,
            indexId: const IdUid(25, 2500612771974500993),
            relationTarget: 'BolusProfile'),
        ModelProperty(
            id: const IdUid(11, 2013538196800336796),
            name: 'basalProfileId',
            type: 11,
            flags: 520,
            indexId: const IdUid(26, 4562998391990896273),
            relationTarget: 'BasalProfile'),
        ModelProperty(
            id: const IdUid(12, 3041952167628926163),
            name: 'reminderDuration',
            type: 6,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(8, 8362795406595606110),
      name: 'LogEventType',
      lastPropertyId: const IdUid(8, 1869014400856897151),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 1430413826199774000),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 2680646402943052466),
            name: 'value',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 8730441532702098240),
            name: 'hasEndTime',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 236107426012682102),
            name: 'defaultReminderDuration',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 7361377572496986196),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 5428344494256722438),
            name: 'deleted',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 9194648252717310397),
            name: 'bolusProfileId',
            type: 11,
            flags: 520,
            indexId: const IdUid(27, 758221514459743282),
            relationTarget: 'BolusProfile'),
        ModelProperty(
            id: const IdUid(8, 1869014400856897151),
            name: 'basalProfileId',
            type: 11,
            flags: 520,
            indexId: const IdUid(28, 4563029809754152081),
            relationTarget: 'BasalProfile')
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(9, 411177866700467286),
      name: 'LogMeal',
      lastPropertyId: const IdUid(19, 8965198821438347033),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 962999525294133158),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 4212591835755306346),
            name: 'value',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 2349971916492396452),
            name: 'carbsRatio',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 6619360836320223700),
            name: 'portionSize',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 8074052538574863399),
            name: 'bolus',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(9, 1920579694098037947),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(10, 1795064951424581062),
            name: 'logEntryId',
            type: 11,
            flags: 520,
            indexId: const IdUid(6, 2834631406671335954),
            relationTarget: 'LogEntry'),
        ModelProperty(
            id: const IdUid(11, 1891119831250929825),
            name: 'mealId',
            type: 11,
            flags: 520,
            indexId: const IdUid(7, 7173877404300881319),
            relationTarget: 'Meal'),
        ModelProperty(
            id: const IdUid(12, 4842743668630588125),
            name: 'mealSourceId',
            type: 11,
            flags: 520,
            indexId: const IdUid(8, 7798251372140622457),
            relationTarget: 'MealSource'),
        ModelProperty(
            id: const IdUid(13, 2354087448211548018),
            name: 'mealCategoryId',
            type: 11,
            flags: 520,
            indexId: const IdUid(9, 169838544472067864),
            relationTarget: 'MealCategory'),
        ModelProperty(
            id: const IdUid(14, 6539714286499574550),
            name: 'mealPortionTypeId',
            type: 11,
            flags: 520,
            indexId: const IdUid(10, 5017472742879643357),
            relationTarget: 'MealPortionType'),
        ModelProperty(
            id: const IdUid(15, 6038336651358102122),
            name: 'portionSizeAccuracyId',
            type: 11,
            flags: 520,
            indexId: const IdUid(11, 7222637893025102905),
            relationTarget: 'Accuracy'),
        ModelProperty(
            id: const IdUid(16, 7121997990741934484),
            name: 'carbsRatioAccuracyId',
            type: 11,
            flags: 520,
            indexId: const IdUid(12, 35287836658362611),
            relationTarget: 'Accuracy'),
        ModelProperty(
            id: const IdUid(17, 7341439841011629937),
            name: 'deleted',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(18, 7405129785654054238),
            name: 'amount',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(19, 8965198821438347033),
            name: 'totalCarbs',
            type: 8,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(10, 382130101578692012),
      name: 'Meal',
      lastPropertyId: const IdUid(15, 8283810711091063880),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 612386612600420389),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 681065067668661250),
            name: 'value',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 2286464176896471045),
            name: 'carbsRatio',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 416562598768357192),
            name: 'portionSize',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 1888298906034647156),
            name: 'carbsPerPortion',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 3569732290918220814),
            name: 'delayedBolusDuration',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(8, 6111684052388229887),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(9, 5739692923906084863),
            name: 'mealSourceId',
            type: 11,
            flags: 520,
            indexId: const IdUid(13, 5996617393160420536),
            relationTarget: 'MealSource'),
        ModelProperty(
            id: const IdUid(10, 8193290820580187413),
            name: 'mealCategoryId',
            type: 11,
            flags: 520,
            indexId: const IdUid(14, 2128681772675444526),
            relationTarget: 'MealCategory'),
        ModelProperty(
            id: const IdUid(11, 3434302594951612479),
            name: 'mealPortionTypeId',
            type: 11,
            flags: 520,
            indexId: const IdUid(15, 6211229960970898621),
            relationTarget: 'MealPortionType'),
        ModelProperty(
            id: const IdUid(12, 7588894964037003621),
            name: 'portionSizeAccuracyId',
            type: 11,
            flags: 520,
            indexId: const IdUid(16, 7050212577048329568),
            relationTarget: 'Accuracy'),
        ModelProperty(
            id: const IdUid(13, 4890778480468380841),
            name: 'carbsRatioAccuracyId',
            type: 11,
            flags: 520,
            indexId: const IdUid(17, 9108886538013386415),
            relationTarget: 'Accuracy'),
        ModelProperty(
            id: const IdUid(14, 3567196286623536415),
            name: 'deleted',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(15, 8283810711091063880),
            name: 'delayedBolusPercentage',
            type: 8,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(11, 3158200688796904913),
      name: 'MealCategory',
      lastPropertyId: const IdUid(4, 824435977543069541),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 3678943122076184840),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 1327341169479604917),
            name: 'value',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 3543757971350345683),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 824435977543069541),
            name: 'deleted',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(12, 2111511899235985637),
      name: 'MealPortionType',
      lastPropertyId: const IdUid(4, 5680236937391945907),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 65428405312238271),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 5681230398840506311),
            name: 'value',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 1950852666001613408),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 5680236937391945907),
            name: 'deleted',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(13, 1283034494527412242),
      name: 'MealSource',
      lastPropertyId: const IdUid(8, 4547899751779962180),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 7205380295259922130),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 5768595544243621991),
            name: 'value',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 458760914712162612),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 2034134758700899120),
            name: 'defaultMealCategoryId',
            type: 11,
            flags: 520,
            indexId: const IdUid(18, 3223820950176501928),
            relationTarget: 'MealCategory'),
        ModelProperty(
            id: const IdUid(5, 8956771998294100216),
            name: 'defaultMealPortionTypeId',
            type: 11,
            flags: 520,
            indexId: const IdUid(19, 2932086504877178672),
            relationTarget: 'MealPortionType'),
        ModelProperty(
            id: const IdUid(6, 7521960537811004317),
            name: 'defaultCarbsRatioAccuracyId',
            type: 11,
            flags: 520,
            indexId: const IdUid(20, 2257356658656760706),
            relationTarget: 'Accuracy'),
        ModelProperty(
            id: const IdUid(7, 5852853174931678667),
            name: 'defaultPortionSizeAccuracyId',
            type: 11,
            flags: 520,
            indexId: const IdUid(21, 1931330716440762729),
            relationTarget: 'Accuracy'),
        ModelProperty(
            id: const IdUid(8, 4547899751779962180),
            name: 'deleted',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(14, 8033487006694871160),
      name: 'LogBolus',
      lastPropertyId: const IdUid(18, 7503231998671134983),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 8254237730262024662),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 7669701519569266656),
            name: 'units',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 1967840431906109999),
            name: 'carbs',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 5520321978435312625),
            name: 'delay',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 3065420032567707091),
            name: 'setManually',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(8, 2967613978873295525),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(9, 5454965717985089938),
            name: 'logEntryId',
            type: 11,
            flags: 520,
            indexId: const IdUid(22, 5852072074740543047),
            relationTarget: 'LogEntry'),
        ModelProperty(
            id: const IdUid(10, 4105009806564072037),
            name: 'rateId',
            type: 11,
            flags: 520,
            indexId: const IdUid(23, 1594553054621930876),
            relationTarget: 'Bolus'),
        ModelProperty(
            id: const IdUid(11, 4818762109001810295),
            name: 'mealId',
            type: 11,
            flags: 520,
            indexId: const IdUid(24, 4224983816051843140),
            relationTarget: 'LogMeal'),
        ModelProperty(
            id: const IdUid(12, 4765038304548427459),
            name: 'deleted',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(13, 2530431967957143684),
            name: 'mgPerDlCurrent',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(14, 5210229118898251877),
            name: 'mgPerDlTarget',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(15, 657840864788362204),
            name: 'mgPerDlCorrection',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(16, 3999403624434995450),
            name: 'mmolPerLCurrent',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(17, 2852253735546692099),
            name: 'mmolPerLTarget',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(18, 7503231998671134983),
            name: 'mmolPerLCorrection',
            type: 8,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(15, 291512798403320400),
      name: 'Accuracy',
      lastPropertyId: const IdUid(7, 6675647182186603076),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 8405388350474524599),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 1919049381880760479),
            name: 'value',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 7181081526218678274),
            name: 'forCarbsRatio',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 3576006369067328383),
            name: 'forPortionSize',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 7027546512578846894),
            name: 'confidenceRating',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 6625101003527710274),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 6675647182186603076),
            name: 'deleted',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(16, 3989341091218179227),
      name: 'Settings',
      lastPropertyId: const IdUid(23, 3611447442844013652),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 7803753645747063723),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 4703380985530623101),
            name: 'dateFormat',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 2983395924801005937),
            name: 'longDateFormat',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 2579032794029389590),
            name: 'timeFormat',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 3970690908108519507),
            name: 'longTimeFormat',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 349893175332801783),
            name: 'showConfirmationDialogOnCancel',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 4049915860178079910),
            name: 'showConfirmationDialogOnDelete',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(8, 3088241443557186512),
            name: 'showConfirmationDialogOnStopEvent',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(18, 1203593429961092769),
            name: 'nutritionMeasurementIndex',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(19, 8895176254912253797),
            name: 'glucoseDisplayModeIndex',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(20, 6560414475711071975),
            name: 'glucoseMeasurementIndex',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(21, 7934134105044248002),
            name: 'targetGlucoseMgPerDl',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(22, 3595473653451456068),
            name: 'targetGlucoseMmolPerL',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(23, 3611447442844013652),
            name: 'useDarkTheme',
            type: 1,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(17, 5041265995704044399),
      name: 'GlucoseTarget',
      lastPropertyId: const IdUid(7, 1333487551279074696),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 4322960567133959537),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 7533461804561299987),
            name: 'deleted',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 4949963248761074916),
            name: 'fromMgPerDL',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 8685380695305799464),
            name: 'toMgPerDl',
            type: 6,
            flags: 0),
        ModelProperty(
            id: const IdUid(5, 2925449628924807050),
            name: 'fromMmolPerL',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(6, 3244873743284485064),
            name: 'toMmolPerL',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(7, 1333487551279074696),
            name: 'color',
            type: 6,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(18, 6497942314956341514),
      name: 'Recipe',
      lastPropertyId: const IdUid(11, 8488657312300528492),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 6426741154282018946),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 1167304402395485629),
            name: 'deleted',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 1244733840071626966),
            name: 'name',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(9, 8593446427752839266),
            name: 'notes',
            type: 9,
            flags: 0),
        ModelProperty(
            id: const IdUid(10, 4370359747396560337),
            name: 'portionId',
            type: 11,
            flags: 520,
            indexId: const IdUid(29, 5110151182694376118),
            relationTarget: 'Meal'),
        ModelProperty(
            id: const IdUid(11, 8488657312300528492),
            name: 'servings',
            type: 8,
            flags: 0)
      ],
      relations: <ModelRelation>[],
      backlinks: <ModelBacklink>[]),
  ModelEntity(
      id: const IdUid(19, 6950311793136068892),
      name: 'Ingredient',
      lastPropertyId: const IdUid(5, 6495065881132428893),
      flags: 2,
      properties: <ModelProperty>[
        ModelProperty(
            id: const IdUid(1, 7766569281758551418),
            name: 'id',
            type: 6,
            flags: 1),
        ModelProperty(
            id: const IdUid(2, 3830559702655088692),
            name: 'deleted',
            type: 1,
            flags: 0),
        ModelProperty(
            id: const IdUid(3, 602057803225843875),
            name: 'amount',
            type: 8,
            flags: 0),
        ModelProperty(
            id: const IdUid(4, 26686399245586953),
            name: 'recipeId',
            type: 11,
            flags: 520,
            indexId: const IdUid(30, 5492781242713788590),
            relationTarget: 'Recipe'),
        ModelProperty(
            id: const IdUid(5, 6495065881132428893),
            name: 'ingredientId',
            type: 11,
            flags: 520,
            indexId: const IdUid(31, 3277019237664417023),
            relationTarget: 'Meal')
      ],
      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(19, 6950311793136068892),
      lastIndexId: const IdUid(31, 3277019237664417023),
      lastRelationId: const IdUid(0, 0),
      lastSequenceId: const IdUid(0, 0),
      retiredEntityUids: const [3095978685310268382],
      retiredIndexUids: const [3670661188280692002, 7379712902406481832],
      retiredPropertyUids: const [
        3455702077061719523,
        1048198814030724077,
        9003780003858349085,
        5421422436108145565,
        7741631874181070179,
        5471636804765937328,
        6855574218883169324,
        5313708456544000157,
        3678829169126156351,
        1568597071506264632,
        8795268969829293398,
        3247926313599127440,
        8789440370359282572,
        7838546213550447420,
        8031421171668506924,
        1614362036318874174,
        1675040259141389754,
        7518219134349037920,
        2172890064639236018,
        310032577683835406,
        5588897884422150510,
        7638848982383620744,
        3282706593658092097,
        596980591281311896,
        3633551763915044903,
        2215708755581938580,
        241621230513128588,
        4678123663117222609,
        780211923138281722,
        763575433624979013,
        1225271130099322691
      ],
      retiredRelationUids: const [],
      modelVersion: 5,
      modelVersionParserMinimum: 5,
      version: 1);

  final bindings = <Type, EntityDefinition>{
    Basal: EntityDefinition<Basal>(
        model: _entities[0],
        toOneRelations: (Basal object) => [object.basalProfile],
        toManyRelations: (Basal object) => {},
        getId: (Basal object) => object.id,
        setId: (Basal object, int id) {
          object.id = id;
        },
        objectToFB: (Basal object, fb.Builder fbb) {
          fbb.startTable(7);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.startTime.millisecondsSinceEpoch);
          fbb.addInt64(2, object.endTime.millisecondsSinceEpoch);
          fbb.addFloat64(3, object.units);
          fbb.addInt64(4, object.basalProfile.targetId);
          fbb.addBool(5, object.deleted);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Basal(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 14, false),
              startTime: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0)),
              endTime: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0)),
              units: const fb.Float64Reader()
                  .vTableGet(buffer, rootOffset, 10, 0));
          object.basalProfile.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0);
          object.basalProfile.attach(store);
          return object;
        }),
    BasalProfile: EntityDefinition<BasalProfile>(
        model: _entities[1],
        toOneRelations: (BasalProfile object) => [],
        toManyRelations: (BasalProfile object) => {},
        getId: (BasalProfile object) => object.id,
        setId: (BasalProfile object, int id) {
          object.id = id;
        },
        objectToFB: (BasalProfile object, fb.Builder fbb) {
          final nameOffset = fbb.writeString(object.name);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(6);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, nameOffset);
          fbb.addBool(2, object.active);
          fbb.addOffset(3, notesOffset);
          fbb.addBool(4, object.deleted);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = BasalProfile(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 12, false),
              name:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              active:
                  const fb.BoolReader().vTableGet(buffer, rootOffset, 8, false),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 10));

          return object;
        }),
    Bolus: EntityDefinition<Bolus>(
        model: _entities[2],
        toOneRelations: (Bolus object) => [object.bolusProfile],
        toManyRelations: (Bolus object) => {},
        getId: (Bolus object) => object.id,
        setId: (Bolus object, int id) {
          object.id = id;
        },
        objectToFB: (Bolus object, fb.Builder fbb) {
          fbb.startTable(10);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.startTime.millisecondsSinceEpoch);
          fbb.addInt64(2, object.endTime.millisecondsSinceEpoch);
          fbb.addFloat64(3, object.units);
          fbb.addFloat64(4, object.carbs);
          fbb.addInt64(5, object.mgPerDl);
          fbb.addFloat64(6, object.mmolPerL);
          fbb.addInt64(7, object.bolusProfile.targetId);
          fbb.addBool(8, object.deleted);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Bolus(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 20, false),
              startTime: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0)),
              endTime: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0)),
              units:
                  const fb.Float64Reader().vTableGet(buffer, rootOffset, 10, 0),
              carbs:
                  const fb.Float64Reader().vTableGet(buffer, rootOffset, 12, 0),
              mgPerDl: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 14),
              mmolPerL: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 16));
          object.bolusProfile.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0);
          object.bolusProfile.attach(store);
          return object;
        }),
    BolusProfile: EntityDefinition<BolusProfile>(
        model: _entities[3],
        toOneRelations: (BolusProfile object) => [],
        toManyRelations: (BolusProfile object) => {},
        getId: (BolusProfile object) => object.id,
        setId: (BolusProfile object, int id) {
          object.id = id;
        },
        objectToFB: (BolusProfile object, fb.Builder fbb) {
          final nameOffset = fbb.writeString(object.name);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(6);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, nameOffset);
          fbb.addBool(2, object.active);
          fbb.addOffset(3, notesOffset);
          fbb.addBool(4, object.deleted);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = BolusProfile(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 12, false),
              name:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              active:
                  const fb.BoolReader().vTableGet(buffer, rootOffset, 8, false),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 10));

          return object;
        }),
    LogEntry: EntityDefinition<LogEntry>(
        model: _entities[4],
        toOneRelations: (LogEntry object) => [],
        toManyRelations: (LogEntry object) => {},
        getId: (LogEntry object) => object.id,
        setId: (LogEntry object, int id) {
          object.id = id;
        },
        objectToFB: (LogEntry object, fb.Builder fbb) {
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(11);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.time.millisecondsSinceEpoch);
          fbb.addInt64(2, object.mgPerDl);
          fbb.addFloat64(3, object.mmolPerL);
          fbb.addOffset(7, notesOffset);
          fbb.addBool(8, object.deleted);
          fbb.addFloat64(9, object.glucoseTrend);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = LogEntry(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 20, false),
              time: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0)),
              mgPerDl: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 8),
              mmolPerL: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 10),
              glucoseTrend: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 22),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 18));

          return object;
        }),
    LogEvent: EntityDefinition<LogEvent>(
        model: _entities[5],
        toOneRelations: (LogEvent object) =>
            [object.eventType, object.bolusProfile, object.basalProfile],
        toManyRelations: (LogEvent object) => {},
        getId: (LogEvent object) => object.id,
        setId: (LogEvent object, int id) {
          object.id = id;
        },
        objectToFB: (LogEvent object, fb.Builder fbb) {
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(13);
          fbb.addInt64(0, object.id);
          fbb.addInt64(1, object.time.millisecondsSinceEpoch);
          fbb.addInt64(2, object.endTime?.millisecondsSinceEpoch);
          fbb.addBool(3, object.hasEndTime);
          fbb.addOffset(4, notesOffset);
          fbb.addInt64(7, object.eventType.targetId);
          fbb.addBool(8, object.deleted);
          fbb.addInt64(9, object.bolusProfile.targetId);
          fbb.addInt64(10, object.basalProfile.targetId);
          fbb.addInt64(11, object.reminderDuration);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);
          final endTimeValue =
              const fb.Int64Reader().vTableGetNullable(buffer, rootOffset, 8);
          final object = LogEvent(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 20, false),
              time: DateTime.fromMillisecondsSinceEpoch(
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0)),
              endTime: endTimeValue == null
                  ? null
                  : DateTime.fromMillisecondsSinceEpoch(endTimeValue),
              hasEndTime: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 10, false),
              reminderDuration: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 26),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 12));
          object.eventType.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0);
          object.eventType.attach(store);
          object.bolusProfile.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0);
          object.bolusProfile.attach(store);
          object.basalProfile.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0);
          object.basalProfile.attach(store);
          return object;
        }),
    LogEventType: EntityDefinition<LogEventType>(
        model: _entities[6],
        toOneRelations: (LogEventType object) =>
            [object.bolusProfile, object.basalProfile],
        toManyRelations: (LogEventType object) => {},
        getId: (LogEventType object) => object.id,
        setId: (LogEventType object, int id) {
          object.id = id;
        },
        objectToFB: (LogEventType object, fb.Builder fbb) {
          final valueOffset = fbb.writeString(object.value);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(9);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, valueOffset);
          fbb.addBool(2, object.hasEndTime);
          fbb.addInt64(3, object.defaultReminderDuration);
          fbb.addOffset(4, notesOffset);
          fbb.addBool(5, object.deleted);
          fbb.addInt64(6, object.bolusProfile.targetId);
          fbb.addInt64(7, object.basalProfile.targetId);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = LogEventType(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 14, false),
              value:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              hasEndTime:
                  const fb.BoolReader().vTableGet(buffer, rootOffset, 8, false),
              defaultReminderDuration: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 10),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 12));
          object.bolusProfile.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 16, 0);
          object.bolusProfile.attach(store);
          object.basalProfile.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0);
          object.basalProfile.attach(store);
          return object;
        }),
    LogMeal: EntityDefinition<LogMeal>(
        model: _entities[7],
        toOneRelations: (LogMeal object) => [
              object.logEntry,
              object.meal,
              object.mealSource,
              object.mealCategory,
              object.mealPortionType,
              object.portionSizeAccuracy,
              object.carbsRatioAccuracy
            ],
        toManyRelations: (LogMeal object) => {},
        getId: (LogMeal object) => object.id,
        setId: (LogMeal object, int id) {
          object.id = id;
        },
        objectToFB: (LogMeal object, fb.Builder fbb) {
          final valueOffset = fbb.writeString(object.value);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(20);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, valueOffset);
          fbb.addFloat64(2, object.carbsRatio);
          fbb.addFloat64(3, object.portionSize);
          fbb.addFloat64(5, object.bolus);
          fbb.addOffset(8, notesOffset);
          fbb.addInt64(9, object.logEntry.targetId);
          fbb.addInt64(10, object.meal.targetId);
          fbb.addInt64(11, object.mealSource.targetId);
          fbb.addInt64(12, object.mealCategory.targetId);
          fbb.addInt64(13, object.mealPortionType.targetId);
          fbb.addInt64(14, object.portionSizeAccuracy.targetId);
          fbb.addInt64(15, object.carbsRatioAccuracy.targetId);
          fbb.addBool(16, object.deleted);
          fbb.addFloat64(17, object.amount);
          fbb.addFloat64(18, object.totalCarbs);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = LogMeal(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 36, false),
              value:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              amount:
                  const fb.Float64Reader().vTableGet(buffer, rootOffset, 38, 0),
              carbsRatio: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 8),
              portionSize: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 10),
              totalCarbs: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 40),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 20))
            ..bolus = const fb.Float64Reader()
                .vTableGetNullable(buffer, rootOffset, 14);
          object.logEntry.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0);
          object.logEntry.attach(store);
          object.meal.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0);
          object.meal.attach(store);
          object.mealSource.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 26, 0);
          object.mealSource.attach(store);
          object.mealCategory.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 28, 0);
          object.mealCategory.attach(store);
          object.mealPortionType.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 30, 0);
          object.mealPortionType.attach(store);
          object.portionSizeAccuracy.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 32, 0);
          object.portionSizeAccuracy.attach(store);
          object.carbsRatioAccuracy.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 34, 0);
          object.carbsRatioAccuracy.attach(store);
          return object;
        }),
    Meal: EntityDefinition<Meal>(
        model: _entities[8],
        toOneRelations: (Meal object) => [
              object.mealSource,
              object.mealCategory,
              object.mealPortionType,
              object.portionSizeAccuracy,
              object.carbsRatioAccuracy
            ],
        toManyRelations: (Meal object) => {},
        getId: (Meal object) => object.id,
        setId: (Meal object, int id) {
          object.id = id;
        },
        objectToFB: (Meal object, fb.Builder fbb) {
          final valueOffset = fbb.writeString(object.value);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(16);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, valueOffset);
          fbb.addFloat64(2, object.carbsRatio);
          fbb.addFloat64(3, object.portionSize);
          fbb.addFloat64(4, object.carbsPerPortion);
          fbb.addInt64(5, object.delayedBolusDuration);
          fbb.addOffset(7, notesOffset);
          fbb.addInt64(8, object.mealSource.targetId);
          fbb.addInt64(9, object.mealCategory.targetId);
          fbb.addInt64(10, object.mealPortionType.targetId);
          fbb.addInt64(11, object.portionSizeAccuracy.targetId);
          fbb.addInt64(12, object.carbsRatioAccuracy.targetId);
          fbb.addBool(13, object.deleted);
          fbb.addFloat64(14, object.delayedBolusPercentage);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Meal(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 30, false),
              value:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              carbsRatio: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 8),
              portionSize: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 10),
              carbsPerPortion: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 12),
              delayedBolusDuration: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 14),
              delayedBolusPercentage: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 32),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 18));
          object.mealSource.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 20, 0);
          object.mealSource.attach(store);
          object.mealCategory.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0);
          object.mealCategory.attach(store);
          object.mealPortionType.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0);
          object.mealPortionType.attach(store);
          object.portionSizeAccuracy.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 26, 0);
          object.portionSizeAccuracy.attach(store);
          object.carbsRatioAccuracy.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 28, 0);
          object.carbsRatioAccuracy.attach(store);
          return object;
        }),
    MealCategory: EntityDefinition<MealCategory>(
        model: _entities[9],
        toOneRelations: (MealCategory object) => [],
        toManyRelations: (MealCategory object) => {},
        getId: (MealCategory object) => object.id,
        setId: (MealCategory object, int id) {
          object.id = id;
        },
        objectToFB: (MealCategory object, fb.Builder fbb) {
          final valueOffset = fbb.writeString(object.value);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(5);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, valueOffset);
          fbb.addOffset(2, notesOffset);
          fbb.addBool(3, object.deleted);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = MealCategory(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 10, false),
              value:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 8));

          return object;
        }),
    MealPortionType: EntityDefinition<MealPortionType>(
        model: _entities[10],
        toOneRelations: (MealPortionType object) => [],
        toManyRelations: (MealPortionType object) => {},
        getId: (MealPortionType object) => object.id,
        setId: (MealPortionType object, int id) {
          object.id = id;
        },
        objectToFB: (MealPortionType object, fb.Builder fbb) {
          final valueOffset = fbb.writeString(object.value);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(5);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, valueOffset);
          fbb.addOffset(2, notesOffset);
          fbb.addBool(3, object.deleted);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = MealPortionType(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 10, false),
              value:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 8));

          return object;
        }),
    MealSource: EntityDefinition<MealSource>(
        model: _entities[11],
        toOneRelations: (MealSource object) => [
              object.defaultMealCategory,
              object.defaultMealPortionType,
              object.defaultCarbsRatioAccuracy,
              object.defaultPortionSizeAccuracy
            ],
        toManyRelations: (MealSource object) => {},
        getId: (MealSource object) => object.id,
        setId: (MealSource object, int id) {
          object.id = id;
        },
        objectToFB: (MealSource object, fb.Builder fbb) {
          final valueOffset = fbb.writeString(object.value);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(9);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, valueOffset);
          fbb.addOffset(2, notesOffset);
          fbb.addInt64(3, object.defaultMealCategory.targetId);
          fbb.addInt64(4, object.defaultMealPortionType.targetId);
          fbb.addInt64(5, object.defaultCarbsRatioAccuracy.targetId);
          fbb.addInt64(6, object.defaultPortionSizeAccuracy.targetId);
          fbb.addBool(7, object.deleted);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = MealSource(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 18, false),
              value:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 8));
          object.defaultMealCategory.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0);
          object.defaultMealCategory.attach(store);
          object.defaultMealPortionType.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0);
          object.defaultMealPortionType.attach(store);
          object.defaultCarbsRatioAccuracy.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 14, 0);
          object.defaultCarbsRatioAccuracy.attach(store);
          object.defaultPortionSizeAccuracy.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 16, 0);
          object.defaultPortionSizeAccuracy.attach(store);
          return object;
        }),
    LogBolus: EntityDefinition<LogBolus>(
        model: _entities[12],
        toOneRelations: (LogBolus object) =>
            [object.logEntry, object.rate, object.meal],
        toManyRelations: (LogBolus object) => {},
        getId: (LogBolus object) => object.id,
        setId: (LogBolus object, int id) {
          object.id = id;
        },
        objectToFB: (LogBolus object, fb.Builder fbb) {
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(19);
          fbb.addInt64(0, object.id);
          fbb.addFloat64(1, object.units);
          fbb.addFloat64(2, object.carbs);
          fbb.addInt64(3, object.delay);
          fbb.addBool(6, object.setManually);
          fbb.addOffset(7, notesOffset);
          fbb.addInt64(8, object.logEntry.targetId);
          fbb.addInt64(9, object.rate.targetId);
          fbb.addInt64(10, object.meal.targetId);
          fbb.addBool(11, object.deleted);
          fbb.addInt64(12, object.mgPerDlCurrent);
          fbb.addInt64(13, object.mgPerDlTarget);
          fbb.addInt64(14, object.mgPerDlCorrection);
          fbb.addFloat64(15, object.mmolPerLCurrent);
          fbb.addFloat64(16, object.mmolPerLTarget);
          fbb.addFloat64(17, object.mmolPerLCorrection);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = LogBolus(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 26, false),
              units:
                  const fb.Float64Reader().vTableGet(buffer, rootOffset, 6, 0),
              carbs: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 8),
              delay: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 10),
              mgPerDlCurrent: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 28),
              mgPerDlTarget: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 30),
              mgPerDlCorrection: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 32),
              mmolPerLCurrent: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 34),
              mmolPerLTarget: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 36),
              mmolPerLCorrection: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 38),
              setManually: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 16, false),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 18));
          object.logEntry.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 20, 0);
          object.logEntry.attach(store);
          object.rate.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0);
          object.rate.attach(store);
          object.meal.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 24, 0);
          object.meal.attach(store);
          return object;
        }),
    Accuracy: EntityDefinition<Accuracy>(
        model: _entities[13],
        toOneRelations: (Accuracy object) => [],
        toManyRelations: (Accuracy object) => {},
        getId: (Accuracy object) => object.id,
        setId: (Accuracy object, int id) {
          object.id = id;
        },
        objectToFB: (Accuracy object, fb.Builder fbb) {
          final valueOffset = fbb.writeString(object.value);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(8);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, valueOffset);
          fbb.addBool(2, object.forCarbsRatio);
          fbb.addBool(3, object.forPortionSize);
          fbb.addInt64(4, object.confidenceRating);
          fbb.addOffset(5, notesOffset);
          fbb.addBool(6, object.deleted);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Accuracy(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 16, false),
              value:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              forCarbsRatio:
                  const fb.BoolReader().vTableGet(buffer, rootOffset, 8, false),
              forPortionSize: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 10, false),
              confidenceRating: const fb.Int64Reader()
                  .vTableGetNullable(buffer, rootOffset, 12),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 14));

          return object;
        }),
    Settings: EntityDefinition<Settings>(
        model: _entities[14],
        toOneRelations: (Settings object) => [],
        toManyRelations: (Settings object) => {},
        getId: (Settings object) => object.id,
        setId: (Settings object, int id) {
          object.id = id;
        },
        objectToFB: (Settings object, fb.Builder fbb) {
          final dateFormatOffset = fbb.writeString(object.dateFormat);
          final longDateFormatOffset = object.longDateFormat == null
              ? null
              : fbb.writeString(object.longDateFormat!);
          final timeFormatOffset = fbb.writeString(object.timeFormat);
          final longTimeFormatOffset = object.longTimeFormat == null
              ? null
              : fbb.writeString(object.longTimeFormat!);
          fbb.startTable(24);
          fbb.addInt64(0, object.id);
          fbb.addOffset(1, dateFormatOffset);
          fbb.addOffset(2, longDateFormatOffset);
          fbb.addOffset(3, timeFormatOffset);
          fbb.addOffset(4, longTimeFormatOffset);
          fbb.addBool(5, object.showConfirmationDialogOnCancel);
          fbb.addBool(6, object.showConfirmationDialogOnDelete);
          fbb.addBool(7, object.showConfirmationDialogOnStopEvent);
          fbb.addInt64(17, object.nutritionMeasurementIndex);
          fbb.addInt64(18, object.glucoseDisplayModeIndex);
          fbb.addInt64(19, object.glucoseMeasurementIndex);
          fbb.addInt64(20, object.targetGlucoseMgPerDl);
          fbb.addFloat64(21, object.targetGlucoseMmolPerL);
          fbb.addBool(22, object.useDarkTheme);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Settings(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              nutritionMeasurementIndex:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 38, 0),
              glucoseDisplayModeIndex:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 40, 0),
              glucoseMeasurementIndex:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 42, 0),
              dateFormat:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 6, ''),
              longDateFormat: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 8),
              timeFormat:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 10, ''),
              longTimeFormat: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 12),
              showConfirmationDialogOnCancel: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 14, false),
              showConfirmationDialogOnDelete: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 16, false),
              showConfirmationDialogOnStopEvent: const fb.BoolReader()
                  .vTableGet(buffer, rootOffset, 18, false),
              targetGlucoseMgPerDl:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 44, 0),
              targetGlucoseMmolPerL:
                  const fb.Float64Reader().vTableGet(buffer, rootOffset, 46, 0),
              useDarkTheme: const fb.BoolReader().vTableGet(buffer, rootOffset, 48, false));

          return object;
        }),
    GlucoseTarget: EntityDefinition<GlucoseTarget>(
        model: _entities[15],
        toOneRelations: (GlucoseTarget object) => [],
        toManyRelations: (GlucoseTarget object) => {},
        getId: (GlucoseTarget object) => object.id,
        setId: (GlucoseTarget object, int id) {
          object.id = id;
        },
        objectToFB: (GlucoseTarget object, fb.Builder fbb) {
          fbb.startTable(8);
          fbb.addInt64(0, object.id);
          fbb.addBool(1, object.deleted);
          fbb.addInt64(2, object.fromMgPerDL);
          fbb.addInt64(3, object.toMgPerDl);
          fbb.addFloat64(4, object.fromMmolPerL);
          fbb.addFloat64(5, object.toMmolPerL);
          fbb.addInt64(6, object.color);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = GlucoseTarget(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted:
                  const fb.BoolReader().vTableGet(buffer, rootOffset, 6, false),
              fromMgPerDL:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0),
              toMgPerDl:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0),
              fromMmolPerL:
                  const fb.Float64Reader().vTableGet(buffer, rootOffset, 12, 0),
              toMmolPerL:
                  const fb.Float64Reader().vTableGet(buffer, rootOffset, 14, 0),
              color:
                  const fb.Int64Reader().vTableGet(buffer, rootOffset, 16, 0));

          return object;
        }),
    Recipe: EntityDefinition<Recipe>(
        model: _entities[16],
        toOneRelations: (Recipe object) => [object.portion],
        toManyRelations: (Recipe object) => {},
        getId: (Recipe object) => object.id,
        setId: (Recipe object, int id) {
          object.id = id;
        },
        objectToFB: (Recipe object, fb.Builder fbb) {
          final nameOffset = fbb.writeString(object.name);
          final notesOffset =
              object.notes == null ? null : fbb.writeString(object.notes!);
          fbb.startTable(12);
          fbb.addInt64(0, object.id);
          fbb.addBool(1, object.deleted);
          fbb.addOffset(2, nameOffset);
          fbb.addOffset(8, notesOffset);
          fbb.addInt64(9, object.portion.targetId);
          fbb.addFloat64(10, object.servings);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Recipe(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted:
                  const fb.BoolReader().vTableGet(buffer, rootOffset, 6, false),
              name:
                  const fb.StringReader().vTableGet(buffer, rootOffset, 8, ''),
              servings: const fb.Float64Reader()
                  .vTableGetNullable(buffer, rootOffset, 24),
              notes: const fb.StringReader()
                  .vTableGetNullable(buffer, rootOffset, 20));
          object.portion.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 22, 0);
          object.portion.attach(store);
          return object;
        }),
    Ingredient: EntityDefinition<Ingredient>(
        model: _entities[17],
        toOneRelations: (Ingredient object) =>
            [object.recipe, object.ingredient],
        toManyRelations: (Ingredient object) => {},
        getId: (Ingredient object) => object.id,
        setId: (Ingredient object, int id) {
          object.id = id;
        },
        objectToFB: (Ingredient object, fb.Builder fbb) {
          fbb.startTable(6);
          fbb.addInt64(0, object.id);
          fbb.addBool(1, object.deleted);
          fbb.addFloat64(2, object.amount);
          fbb.addInt64(3, object.recipe.targetId);
          fbb.addInt64(4, object.ingredient.targetId);
          fbb.finish(fbb.endTable());
          return object.id;
        },
        objectFromFB: (Store store, ByteData fbData) {
          final buffer = fb.BufferContext(fbData);
          final rootOffset = buffer.derefObject(0);

          final object = Ingredient(
              id: const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0),
              deleted:
                  const fb.BoolReader().vTableGet(buffer, rootOffset, 6, false),
              amount:
                  const fb.Float64Reader().vTableGet(buffer, rootOffset, 8, 0));
          object.recipe.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0);
          object.recipe.attach(store);
          object.ingredient.targetId =
              const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0);
          object.ingredient.attach(store);
          return object;
        })
  };

  return ModelDefinition(model, bindings);
}

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

  /// see [Basal.startTime]
  static final startTime =
      QueryIntegerProperty<Basal>(_entities[0].properties[1]);

  /// see [Basal.endTime]
  static final endTime =
      QueryIntegerProperty<Basal>(_entities[0].properties[2]);

  /// see [Basal.units]
  static final units = QueryDoubleProperty<Basal>(_entities[0].properties[3]);

  /// see [Basal.basalProfile]
  static final basalProfile =
      QueryRelationToOne<Basal, BasalProfile>(_entities[0].properties[4]);

  /// see [Basal.deleted]
  static final deleted =
      QueryBooleanProperty<Basal>(_entities[0].properties[5]);
}

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

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

  /// see [BasalProfile.active]
  static final active =
      QueryBooleanProperty<BasalProfile>(_entities[1].properties[2]);

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

  /// see [BasalProfile.deleted]
  static final deleted =
      QueryBooleanProperty<BasalProfile>(_entities[1].properties[4]);
}

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

  /// see [Bolus.startTime]
  static final startTime =
      QueryIntegerProperty<Bolus>(_entities[2].properties[1]);

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

  /// see [Bolus.units]
  static final units = QueryDoubleProperty<Bolus>(_entities[2].properties[3]);

  /// see [Bolus.carbs]
  static final carbs = QueryDoubleProperty<Bolus>(_entities[2].properties[4]);

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

  /// see [Bolus.mmolPerL]
  static final mmolPerL =
      QueryDoubleProperty<Bolus>(_entities[2].properties[6]);

  /// see [Bolus.bolusProfile]
  static final bolusProfile =
      QueryRelationToOne<Bolus, BolusProfile>(_entities[2].properties[7]);

  /// see [Bolus.deleted]
  static final deleted =
      QueryBooleanProperty<Bolus>(_entities[2].properties[8]);
}

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

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

  /// see [BolusProfile.active]
  static final active =
      QueryBooleanProperty<BolusProfile>(_entities[3].properties[2]);

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

  /// see [BolusProfile.deleted]
  static final deleted =
      QueryBooleanProperty<BolusProfile>(_entities[3].properties[4]);
}

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

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

  /// see [LogEntry.mgPerDl]
  static final mgPerDl =
      QueryIntegerProperty<LogEntry>(_entities[4].properties[2]);

  /// see [LogEntry.mmolPerL]
  static final mmolPerL =
      QueryDoubleProperty<LogEntry>(_entities[4].properties[3]);

  /// see [LogEntry.notes]
  static final notes =
      QueryStringProperty<LogEntry>(_entities[4].properties[4]);

  /// see [LogEntry.deleted]
  static final deleted =
      QueryBooleanProperty<LogEntry>(_entities[4].properties[5]);

  /// see [LogEntry.glucoseTrend]
  static final glucoseTrend =
      QueryDoubleProperty<LogEntry>(_entities[4].properties[6]);
}

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

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

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

  /// see [LogEvent.hasEndTime]
  static final hasEndTime =
      QueryBooleanProperty<LogEvent>(_entities[5].properties[3]);

  /// see [LogEvent.notes]
  static final notes =
      QueryStringProperty<LogEvent>(_entities[5].properties[4]);

  /// see [LogEvent.eventType]
  static final eventType =
      QueryRelationToOne<LogEvent, LogEventType>(_entities[5].properties[5]);

  /// see [LogEvent.deleted]
  static final deleted =
      QueryBooleanProperty<LogEvent>(_entities[5].properties[6]);

  /// see [LogEvent.bolusProfile]
  static final bolusProfile =
      QueryRelationToOne<LogEvent, BolusProfile>(_entities[5].properties[7]);

  /// see [LogEvent.basalProfile]
  static final basalProfile =
      QueryRelationToOne<LogEvent, BasalProfile>(_entities[5].properties[8]);

  /// see [LogEvent.reminderDuration]
  static final reminderDuration =
      QueryIntegerProperty<LogEvent>(_entities[5].properties[9]);
}

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

  /// see [LogEventType.value]
  static final value =
      QueryStringProperty<LogEventType>(_entities[6].properties[1]);

  /// see [LogEventType.hasEndTime]
  static final hasEndTime =
      QueryBooleanProperty<LogEventType>(_entities[6].properties[2]);

  /// see [LogEventType.defaultReminderDuration]
  static final defaultReminderDuration =
      QueryIntegerProperty<LogEventType>(_entities[6].properties[3]);

  /// see [LogEventType.notes]
  static final notes =
      QueryStringProperty<LogEventType>(_entities[6].properties[4]);

  /// see [LogEventType.deleted]
  static final deleted =
      QueryBooleanProperty<LogEventType>(_entities[6].properties[5]);

  /// see [LogEventType.bolusProfile]
  static final bolusProfile = QueryRelationToOne<LogEventType, BolusProfile>(
      _entities[6].properties[6]);

  /// see [LogEventType.basalProfile]
  static final basalProfile = QueryRelationToOne<LogEventType, BasalProfile>(
      _entities[6].properties[7]);
}

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

  /// see [LogMeal.value]
  static final value = QueryStringProperty<LogMeal>(_entities[7].properties[1]);

  /// see [LogMeal.carbsRatio]
  static final carbsRatio =
      QueryDoubleProperty<LogMeal>(_entities[7].properties[2]);

  /// see [LogMeal.portionSize]
  static final portionSize =
      QueryDoubleProperty<LogMeal>(_entities[7].properties[3]);

  /// see [LogMeal.bolus]
  static final bolus = QueryDoubleProperty<LogMeal>(_entities[7].properties[4]);

  /// see [LogMeal.notes]
  static final notes = QueryStringProperty<LogMeal>(_entities[7].properties[5]);

  /// see [LogMeal.logEntry]
  static final logEntry =
      QueryRelationToOne<LogMeal, LogEntry>(_entities[7].properties[6]);

  /// see [LogMeal.meal]
  static final meal =
      QueryRelationToOne<LogMeal, Meal>(_entities[7].properties[7]);

  /// see [LogMeal.mealSource]
  static final mealSource =
      QueryRelationToOne<LogMeal, MealSource>(_entities[7].properties[8]);

  /// see [LogMeal.mealCategory]
  static final mealCategory =
      QueryRelationToOne<LogMeal, MealCategory>(_entities[7].properties[9]);

  /// see [LogMeal.mealPortionType]
  static final mealPortionType =
      QueryRelationToOne<LogMeal, MealPortionType>(_entities[7].properties[10]);

  /// see [LogMeal.portionSizeAccuracy]
  static final portionSizeAccuracy =
      QueryRelationToOne<LogMeal, Accuracy>(_entities[7].properties[11]);

  /// see [LogMeal.carbsRatioAccuracy]
  static final carbsRatioAccuracy =
      QueryRelationToOne<LogMeal, Accuracy>(_entities[7].properties[12]);

  /// see [LogMeal.deleted]
  static final deleted =
      QueryBooleanProperty<LogMeal>(_entities[7].properties[13]);

  /// see [LogMeal.amount]
  static final amount =
      QueryDoubleProperty<LogMeal>(_entities[7].properties[14]);

  /// see [LogMeal.totalCarbs]
  static final totalCarbs =
      QueryDoubleProperty<LogMeal>(_entities[7].properties[15]);
}

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

  /// see [Meal.value]
  static final value = QueryStringProperty<Meal>(_entities[8].properties[1]);

  /// see [Meal.carbsRatio]
  static final carbsRatio =
      QueryDoubleProperty<Meal>(_entities[8].properties[2]);

  /// see [Meal.portionSize]
  static final portionSize =
      QueryDoubleProperty<Meal>(_entities[8].properties[3]);

  /// see [Meal.carbsPerPortion]
  static final carbsPerPortion =
      QueryDoubleProperty<Meal>(_entities[8].properties[4]);

  /// see [Meal.delayedBolusDuration]
  static final delayedBolusDuration =
      QueryIntegerProperty<Meal>(_entities[8].properties[5]);

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

  /// see [Meal.mealSource]
  static final mealSource =
      QueryRelationToOne<Meal, MealSource>(_entities[8].properties[7]);

  /// see [Meal.mealCategory]
  static final mealCategory =
      QueryRelationToOne<Meal, MealCategory>(_entities[8].properties[8]);

  /// see [Meal.mealPortionType]
  static final mealPortionType =
      QueryRelationToOne<Meal, MealPortionType>(_entities[8].properties[9]);

  /// see [Meal.portionSizeAccuracy]
  static final portionSizeAccuracy =
      QueryRelationToOne<Meal, Accuracy>(_entities[8].properties[10]);

  /// see [Meal.carbsRatioAccuracy]
  static final carbsRatioAccuracy =
      QueryRelationToOne<Meal, Accuracy>(_entities[8].properties[11]);

  /// see [Meal.deleted]
  static final deleted =
      QueryBooleanProperty<Meal>(_entities[8].properties[12]);

  /// see [Meal.delayedBolusPercentage]
  static final delayedBolusPercentage =
      QueryDoubleProperty<Meal>(_entities[8].properties[13]);
}

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

  /// see [MealCategory.value]
  static final value =
      QueryStringProperty<MealCategory>(_entities[9].properties[1]);

  /// see [MealCategory.notes]
  static final notes =
      QueryStringProperty<MealCategory>(_entities[9].properties[2]);

  /// see [MealCategory.deleted]
  static final deleted =
      QueryBooleanProperty<MealCategory>(_entities[9].properties[3]);
}

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

  /// see [MealPortionType.value]
  static final value =
      QueryStringProperty<MealPortionType>(_entities[10].properties[1]);

  /// see [MealPortionType.notes]
  static final notes =
      QueryStringProperty<MealPortionType>(_entities[10].properties[2]);

  /// see [MealPortionType.deleted]
  static final deleted =
      QueryBooleanProperty<MealPortionType>(_entities[10].properties[3]);
}

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

  /// see [MealSource.value]
  static final value =
      QueryStringProperty<MealSource>(_entities[11].properties[1]);

  /// see [MealSource.notes]
  static final notes =
      QueryStringProperty<MealSource>(_entities[11].properties[2]);

  /// see [MealSource.defaultMealCategory]
  static final defaultMealCategory =
      QueryRelationToOne<MealSource, MealCategory>(_entities[11].properties[3]);

  /// see [MealSource.defaultMealPortionType]
  static final defaultMealPortionType =
      QueryRelationToOne<MealSource, MealPortionType>(
          _entities[11].properties[4]);

  /// see [MealSource.defaultCarbsRatioAccuracy]
  static final defaultCarbsRatioAccuracy =
      QueryRelationToOne<MealSource, Accuracy>(_entities[11].properties[5]);

  /// see [MealSource.defaultPortionSizeAccuracy]
  static final defaultPortionSizeAccuracy =
      QueryRelationToOne<MealSource, Accuracy>(_entities[11].properties[6]);

  /// see [MealSource.deleted]
  static final deleted =
      QueryBooleanProperty<MealSource>(_entities[11].properties[7]);
}

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

  /// see [LogBolus.units]
  static final units =
      QueryDoubleProperty<LogBolus>(_entities[12].properties[1]);

  /// see [LogBolus.carbs]
  static final carbs =
      QueryDoubleProperty<LogBolus>(_entities[12].properties[2]);

  /// see [LogBolus.delay]
  static final delay =
      QueryIntegerProperty<LogBolus>(_entities[12].properties[3]);

  /// see [LogBolus.setManually]
  static final setManually =
      QueryBooleanProperty<LogBolus>(_entities[12].properties[4]);

  /// see [LogBolus.notes]
  static final notes =
      QueryStringProperty<LogBolus>(_entities[12].properties[5]);

  /// see [LogBolus.logEntry]
  static final logEntry =
      QueryRelationToOne<LogBolus, LogEntry>(_entities[12].properties[6]);

  /// see [LogBolus.rate]
  static final rate =
      QueryRelationToOne<LogBolus, Bolus>(_entities[12].properties[7]);

  /// see [LogBolus.meal]
  static final meal =
      QueryRelationToOne<LogBolus, LogMeal>(_entities[12].properties[8]);

  /// see [LogBolus.deleted]
  static final deleted =
      QueryBooleanProperty<LogBolus>(_entities[12].properties[9]);

  /// see [LogBolus.mgPerDlCurrent]
  static final mgPerDlCurrent =
      QueryIntegerProperty<LogBolus>(_entities[12].properties[10]);

  /// see [LogBolus.mgPerDlTarget]
  static final mgPerDlTarget =
      QueryIntegerProperty<LogBolus>(_entities[12].properties[11]);

  /// see [LogBolus.mgPerDlCorrection]
  static final mgPerDlCorrection =
      QueryIntegerProperty<LogBolus>(_entities[12].properties[12]);

  /// see [LogBolus.mmolPerLCurrent]
  static final mmolPerLCurrent =
      QueryDoubleProperty<LogBolus>(_entities[12].properties[13]);

  /// see [LogBolus.mmolPerLTarget]
  static final mmolPerLTarget =
      QueryDoubleProperty<LogBolus>(_entities[12].properties[14]);

  /// see [LogBolus.mmolPerLCorrection]
  static final mmolPerLCorrection =
      QueryDoubleProperty<LogBolus>(_entities[12].properties[15]);
}

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

  /// see [Accuracy.value]
  static final value =
      QueryStringProperty<Accuracy>(_entities[13].properties[1]);

  /// see [Accuracy.forCarbsRatio]
  static final forCarbsRatio =
      QueryBooleanProperty<Accuracy>(_entities[13].properties[2]);

  /// see [Accuracy.forPortionSize]
  static final forPortionSize =
      QueryBooleanProperty<Accuracy>(_entities[13].properties[3]);

  /// see [Accuracy.confidenceRating]
  static final confidenceRating =
      QueryIntegerProperty<Accuracy>(_entities[13].properties[4]);

  /// see [Accuracy.notes]
  static final notes =
      QueryStringProperty<Accuracy>(_entities[13].properties[5]);

  /// see [Accuracy.deleted]
  static final deleted =
      QueryBooleanProperty<Accuracy>(_entities[13].properties[6]);
}

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

  /// see [Settings.dateFormat]
  static final dateFormat =
      QueryStringProperty<Settings>(_entities[14].properties[1]);

  /// see [Settings.longDateFormat]
  static final longDateFormat =
      QueryStringProperty<Settings>(_entities[14].properties[2]);

  /// see [Settings.timeFormat]
  static final timeFormat =
      QueryStringProperty<Settings>(_entities[14].properties[3]);

  /// see [Settings.longTimeFormat]
  static final longTimeFormat =
      QueryStringProperty<Settings>(_entities[14].properties[4]);

  /// see [Settings.showConfirmationDialogOnCancel]
  static final showConfirmationDialogOnCancel =
      QueryBooleanProperty<Settings>(_entities[14].properties[5]);

  /// see [Settings.showConfirmationDialogOnDelete]
  static final showConfirmationDialogOnDelete =
      QueryBooleanProperty<Settings>(_entities[14].properties[6]);

  /// see [Settings.showConfirmationDialogOnStopEvent]
  static final showConfirmationDialogOnStopEvent =
      QueryBooleanProperty<Settings>(_entities[14].properties[7]);

  /// see [Settings.nutritionMeasurementIndex]
  static final nutritionMeasurementIndex =
      QueryIntegerProperty<Settings>(_entities[14].properties[8]);

  /// see [Settings.glucoseDisplayModeIndex]
  static final glucoseDisplayModeIndex =
      QueryIntegerProperty<Settings>(_entities[14].properties[9]);

  /// see [Settings.glucoseMeasurementIndex]
  static final glucoseMeasurementIndex =
      QueryIntegerProperty<Settings>(_entities[14].properties[10]);

  /// see [Settings.targetGlucoseMgPerDl]
  static final targetGlucoseMgPerDl =
      QueryIntegerProperty<Settings>(_entities[14].properties[11]);

  /// see [Settings.targetGlucoseMmolPerL]
  static final targetGlucoseMmolPerL =
      QueryDoubleProperty<Settings>(_entities[14].properties[12]);

  /// see [Settings.useDarkTheme]
  static final useDarkTheme =
      QueryBooleanProperty<Settings>(_entities[14].properties[13]);
}

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

  /// see [GlucoseTarget.deleted]
  static final deleted =
      QueryBooleanProperty<GlucoseTarget>(_entities[15].properties[1]);

  /// see [GlucoseTarget.fromMgPerDL]
  static final fromMgPerDL =
      QueryIntegerProperty<GlucoseTarget>(_entities[15].properties[2]);

  /// see [GlucoseTarget.toMgPerDl]
  static final toMgPerDl =
      QueryIntegerProperty<GlucoseTarget>(_entities[15].properties[3]);

  /// see [GlucoseTarget.fromMmolPerL]
  static final fromMmolPerL =
      QueryDoubleProperty<GlucoseTarget>(_entities[15].properties[4]);

  /// see [GlucoseTarget.toMmolPerL]
  static final toMmolPerL =
      QueryDoubleProperty<GlucoseTarget>(_entities[15].properties[5]);

  /// see [GlucoseTarget.color]
  static final color =
      QueryIntegerProperty<GlucoseTarget>(_entities[15].properties[6]);
}

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

  /// see [Recipe.deleted]
  static final deleted =
      QueryBooleanProperty<Recipe>(_entities[16].properties[1]);

  /// see [Recipe.name]
  static final name = QueryStringProperty<Recipe>(_entities[16].properties[2]);

  /// see [Recipe.notes]
  static final notes = QueryStringProperty<Recipe>(_entities[16].properties[3]);

  /// see [Recipe.portion]
  static final portion =
      QueryRelationToOne<Recipe, Meal>(_entities[16].properties[4]);

  /// see [Recipe.servings]
  static final servings =
      QueryDoubleProperty<Recipe>(_entities[16].properties[5]);
}

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

  /// see [Ingredient.deleted]
  static final deleted =
      QueryBooleanProperty<Ingredient>(_entities[17].properties[1]);

  /// see [Ingredient.amount]
  static final amount =
      QueryDoubleProperty<Ingredient>(_entities[17].properties[2]);

  /// see [Ingredient.recipe]
  static final recipe =
      QueryRelationToOne<Ingredient, Recipe>(_entities[17].properties[3]);

  /// see [Ingredient.ingredient]
  static final ingredient =
      QueryRelationToOne<Ingredient, Meal>(_entities[17].properties[4]);
}
