objectbox.g.dart 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. // GENERATED CODE - DO NOT MODIFY BY HAND
  2. // ignore_for_file: camel_case_types
  3. import 'dart:typed_data';
  4. import 'package:objectbox/flatbuffers/flat_buffers.dart' as fb;
  5. import 'package:objectbox/internal.dart'; // generated code can access "internal" functionality
  6. import 'package:objectbox/objectbox.dart';
  7. import 'package:objectbox_flutter_libs/objectbox_flutter_libs.dart';
  8. import 'model/friendship.dart';
  9. import 'model/group.dart';
  10. import 'model/message.dart';
  11. import 'model/profile.dart';
  12. import 'model/user.dart';
  13. export 'package:objectbox/objectbox.dart'; // so that callers only have to import this file
  14. final _entities = <ModelEntity>[
  15. ModelEntity(
  16. id: const IdUid(2, 1438354990151910015),
  17. name: 'Profile',
  18. lastPropertyId: const IdUid(9, 2124161694143580615),
  19. flags: 0,
  20. properties: <ModelProperty>[
  21. ModelProperty(
  22. id: const IdUid(1, 3873481118333862410),
  23. name: 'id',
  24. type: 6,
  25. flags: 1),
  26. ModelProperty(
  27. id: const IdUid(2, 9078004558710481468),
  28. name: 'theme',
  29. type: 6,
  30. flags: 0),
  31. ModelProperty(
  32. id: const IdUid(4, 5923665807684456265),
  33. name: 'isLogin',
  34. type: 1,
  35. flags: 0),
  36. ModelProperty(
  37. id: const IdUid(7, 4763561980566319174),
  38. name: 'isLogout',
  39. type: 1,
  40. flags: 0)
  41. ],
  42. relations: <ModelRelation>[],
  43. backlinks: <ModelBacklink>[]),
  44. ModelEntity(
  45. id: const IdUid(5, 8880211362757189177),
  46. name: 'Message',
  47. lastPropertyId: const IdUid(10, 374576085041052636),
  48. flags: 0,
  49. properties: <ModelProperty>[
  50. ModelProperty(
  51. id: const IdUid(1, 8816894358087325317),
  52. name: 'id',
  53. type: 6,
  54. flags: 1),
  55. ModelProperty(
  56. id: const IdUid(8, 8678749043281739962),
  57. name: 'fromId',
  58. type: 11,
  59. flags: 520,
  60. indexId: const IdUid(19, 8639940058127995637),
  61. relationTarget: 'User'),
  62. ModelProperty(
  63. id: const IdUid(9, 5782107643295328726),
  64. name: 'toId',
  65. type: 11,
  66. flags: 520,
  67. indexId: const IdUid(20, 304254955908714790),
  68. relationTarget: 'User'),
  69. ModelProperty(
  70. id: const IdUid(10, 374576085041052636),
  71. name: 'plaintext',
  72. type: 9,
  73. flags: 0)
  74. ],
  75. relations: <ModelRelation>[],
  76. backlinks: <ModelBacklink>[]),
  77. ModelEntity(
  78. id: const IdUid(6, 6066676571331973763),
  79. name: 'User',
  80. lastPropertyId: const IdUid(9, 8156592908306452117),
  81. flags: 0,
  82. properties: <ModelProperty>[
  83. ModelProperty(
  84. id: const IdUid(1, 5757871925438229578),
  85. name: 'id',
  86. type: 6,
  87. flags: 1),
  88. ModelProperty(
  89. id: const IdUid(3, 2365120802531976993),
  90. name: 'username',
  91. type: 9,
  92. flags: 2080,
  93. indexId: const IdUid(9, 7432421428375491492)),
  94. ModelProperty(
  95. id: const IdUid(4, 3332680204867820806),
  96. name: 'isDND',
  97. type: 1,
  98. flags: 0),
  99. ModelProperty(
  100. id: const IdUid(5, 2234651531374642771),
  101. name: 'isStick',
  102. type: 1,
  103. flags: 0),
  104. ModelProperty(
  105. id: const IdUid(6, 3504407138147737485),
  106. name: 'isSpecialAttention',
  107. type: 1,
  108. flags: 0),
  109. ModelProperty(
  110. id: const IdUid(7, 1645455969656989260),
  111. name: 'bio',
  112. type: 9,
  113. flags: 0),
  114. ModelProperty(
  115. id: const IdUid(8, 1358020543347548551),
  116. name: 'phone',
  117. type: 9,
  118. flags: 0),
  119. ModelProperty(
  120. id: const IdUid(9, 8156592908306452117),
  121. name: 'avatar',
  122. type: 9,
  123. flags: 0)
  124. ],
  125. relations: <ModelRelation>[
  126. ModelRelation(
  127. id: const IdUid(2, 3118435353931894829),
  128. name: 'friends',
  129. targetId: const IdUid(6, 6066676571331973763)),
  130. ModelRelation(
  131. id: const IdUid(5, 8362659550242546106),
  132. name: 'messages',
  133. targetId: const IdUid(5, 8880211362757189177)),
  134. ModelRelation(
  135. id: const IdUid(6, 6570620621500888428),
  136. name: 'groupMessages',
  137. targetId: const IdUid(8, 8842794649328270120))
  138. ],
  139. backlinks: <ModelBacklink>[]),
  140. ModelEntity(
  141. id: const IdUid(7, 1497196184348190204),
  142. name: 'Group',
  143. lastPropertyId: const IdUid(1, 8442786984080711776),
  144. flags: 0,
  145. properties: <ModelProperty>[
  146. ModelProperty(
  147. id: const IdUid(1, 8442786984080711776),
  148. name: 'id',
  149. type: 6,
  150. flags: 1)
  151. ],
  152. relations: <ModelRelation>[
  153. ModelRelation(
  154. id: const IdUid(3, 7924032496731598926),
  155. name: 'members',
  156. targetId: const IdUid(6, 6066676571331973763)),
  157. ModelRelation(
  158. id: const IdUid(4, 1657013690878572102),
  159. name: 'messages',
  160. targetId: const IdUid(8, 8842794649328270120))
  161. ],
  162. backlinks: <ModelBacklink>[]),
  163. ModelEntity(
  164. id: const IdUid(8, 8842794649328270120),
  165. name: 'GroupMessage',
  166. lastPropertyId: const IdUid(9, 4521061296978960561),
  167. flags: 0,
  168. properties: <ModelProperty>[
  169. ModelProperty(
  170. id: const IdUid(1, 8727865543427007275),
  171. name: 'id',
  172. type: 6,
  173. flags: 1),
  174. ModelProperty(
  175. id: const IdUid(7, 3385606654272810305),
  176. name: 'userId',
  177. type: 11,
  178. flags: 520,
  179. indexId: const IdUid(17, 8821791717138159999),
  180. relationTarget: 'User'),
  181. ModelProperty(
  182. id: const IdUid(8, 3058571589698982963),
  183. name: 'groupId',
  184. type: 11,
  185. flags: 520,
  186. indexId: const IdUid(18, 1064437420014320687),
  187. relationTarget: 'Group'),
  188. ModelProperty(
  189. id: const IdUid(9, 4521061296978960561),
  190. name: 'plaintext',
  191. type: 9,
  192. flags: 0)
  193. ],
  194. relations: <ModelRelation>[],
  195. backlinks: <ModelBacklink>[]),
  196. ModelEntity(
  197. id: const IdUid(9, 2478855716396571806),
  198. name: 'FriendShip',
  199. lastPropertyId: const IdUid(5, 89425193393960797),
  200. flags: 0,
  201. properties: <ModelProperty>[
  202. ModelProperty(
  203. id: const IdUid(1, 5265335145979968165),
  204. name: 'id',
  205. type: 6,
  206. flags: 1),
  207. ModelProperty(
  208. id: const IdUid(4, 6943551359011057155),
  209. name: 'user0Id',
  210. type: 11,
  211. flags: 520,
  212. indexId: const IdUid(15, 6350205891372750325),
  213. relationTarget: 'User'),
  214. ModelProperty(
  215. id: const IdUid(5, 89425193393960797),
  216. name: 'user1Id',
  217. type: 11,
  218. flags: 520,
  219. indexId: const IdUid(16, 5223993210314820647),
  220. relationTarget: 'User')
  221. ],
  222. relations: <ModelRelation>[
  223. ModelRelation(
  224. id: const IdUid(7, 4471061252621927376),
  225. name: 'messages',
  226. targetId: const IdUid(5, 8880211362757189177))
  227. ],
  228. backlinks: <ModelBacklink>[])
  229. ];
  230. /// Open an ObjectBox store with the model declared in this file.
  231. Future<Store> openStore(
  232. {String? directory,
  233. int? maxDBSizeInKB,
  234. int? fileMode,
  235. int? maxReaders,
  236. bool queriesCaseSensitiveDefault = true,
  237. String? macosApplicationGroup}) async =>
  238. Store(getObjectBoxModel(),
  239. directory: directory ?? (await defaultStoreDirectory()).path,
  240. maxDBSizeInKB: maxDBSizeInKB,
  241. fileMode: fileMode,
  242. maxReaders: maxReaders,
  243. queriesCaseSensitiveDefault: queriesCaseSensitiveDefault,
  244. macosApplicationGroup: macosApplicationGroup);
  245. /// ObjectBox model definition, pass it to [Store] - Store(getObjectBoxModel())
  246. ModelDefinition getObjectBoxModel() {
  247. final model = ModelInfo(
  248. entities: _entities,
  249. lastEntityId: const IdUid(9, 2478855716396571806),
  250. lastIndexId: const IdUid(21, 4046871049442788311),
  251. lastRelationId: const IdUid(7, 4471061252621927376),
  252. lastSequenceId: const IdUid(0, 0),
  253. retiredEntityUids: const [
  254. 3444477729893015694,
  255. 5044745765388820377,
  256. 2132486004932842474
  257. ],
  258. retiredIndexUids: const [
  259. 2181766053148811865,
  260. 6495021264194887400,
  261. 5329740598468773345,
  262. 8703247978603696283,
  263. 459640529781791232,
  264. 5268783855356873237,
  265. 7769527806721188121,
  266. 7233565214869368113,
  267. 6309601695170211538,
  268. 205849996938840771,
  269. 4046871049442788311
  270. ],
  271. retiredPropertyUids: const [
  272. 5463014948149082651,
  273. 2305308568754167021,
  274. 649621747167423523,
  275. 4818206049188692305,
  276. 2230815448876041069,
  277. 5034484793468406763,
  278. 754684519442805673,
  279. 214180290351070734,
  280. 7647214962273172849,
  281. 6701330857882848509,
  282. 2182219019195059976,
  283. 7982216815340584307,
  284. 7721473969164711791,
  285. 609986407749732855,
  286. 8078506595736209118,
  287. 5514462395021006262,
  288. 1148609827653786396,
  289. 7294884137191806532,
  290. 7501600871221400279,
  291. 5148143939128616318,
  292. 634385368395524800,
  293. 4388824818686674479,
  294. 8861377786907255369,
  295. 4222660909971782394,
  296. 2124161694143580615
  297. ],
  298. retiredRelationUids: const [],
  299. modelVersion: 5,
  300. modelVersionParserMinimum: 5,
  301. version: 1);
  302. final bindings = <Type, EntityDefinition>{
  303. Profile: EntityDefinition<Profile>(
  304. model: _entities[0],
  305. toOneRelations: (Profile object) => [],
  306. toManyRelations: (Profile object) => {},
  307. getId: (Profile object) => object.id,
  308. setId: (Profile object, int id) {
  309. object.id = id;
  310. },
  311. objectToFB: (Profile object, fb.Builder fbb) {
  312. fbb.startTable(10);
  313. fbb.addInt64(0, object.id);
  314. fbb.addInt64(1, object.theme);
  315. fbb.addBool(3, object.isLogin);
  316. fbb.addBool(6, object.isLogout);
  317. fbb.finish(fbb.endTable());
  318. return object.id;
  319. },
  320. objectFromFB: (Store store, ByteData fbData) {
  321. final buffer = fb.BufferContext(fbData);
  322. final rootOffset = buffer.derefObject(0);
  323. final object = Profile()
  324. ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0)
  325. ..theme = const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0)
  326. ..isLogin =
  327. const fb.BoolReader().vTableGet(buffer, rootOffset, 10, false)
  328. ..isLogout =
  329. const fb.BoolReader().vTableGet(buffer, rootOffset, 16, false);
  330. return object;
  331. }),
  332. Message: EntityDefinition<Message>(
  333. model: _entities[1],
  334. toOneRelations: (Message object) => [object.from, object.to],
  335. toManyRelations: (Message object) => {},
  336. getId: (Message object) => object.id,
  337. setId: (Message object, int id) {
  338. object.id = id;
  339. },
  340. objectToFB: (Message object, fb.Builder fbb) {
  341. final plaintextOffset = fbb.writeString(object.plaintext);
  342. fbb.startTable(11);
  343. fbb.addInt64(0, object.id);
  344. fbb.addInt64(7, object.from.targetId);
  345. fbb.addInt64(8, object.to.targetId);
  346. fbb.addOffset(9, plaintextOffset);
  347. fbb.finish(fbb.endTable());
  348. return object.id;
  349. },
  350. objectFromFB: (Store store, ByteData fbData) {
  351. final buffer = fb.BufferContext(fbData);
  352. final rootOffset = buffer.derefObject(0);
  353. final object = Message()
  354. ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0)
  355. ..plaintext =
  356. const fb.StringReader().vTableGet(buffer, rootOffset, 22, '');
  357. object.from.targetId =
  358. const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0);
  359. object.from.attach(store);
  360. object.to.targetId =
  361. const fb.Int64Reader().vTableGet(buffer, rootOffset, 20, 0);
  362. object.to.attach(store);
  363. return object;
  364. }),
  365. User: EntityDefinition<User>(
  366. model: _entities[2],
  367. toOneRelations: (User object) => [],
  368. toManyRelations: (User object) => {
  369. RelInfo<User>.toMany(2, object.id): object.friends,
  370. RelInfo<User>.toMany(5, object.id): object.messages,
  371. RelInfo<User>.toMany(6, object.id): object.groupMessages
  372. },
  373. getId: (User object) => object.id,
  374. setId: (User object, int id) {
  375. object.id = id;
  376. },
  377. objectToFB: (User object, fb.Builder fbb) {
  378. final usernameOffset = fbb.writeString(object.username);
  379. final bioOffset =
  380. object.bio == null ? null : fbb.writeString(object.bio!);
  381. final phoneOffset =
  382. object.phone == null ? null : fbb.writeString(object.phone!);
  383. final avatarOffset =
  384. object.avatar == null ? null : fbb.writeString(object.avatar!);
  385. fbb.startTable(10);
  386. fbb.addInt64(0, object.id);
  387. fbb.addOffset(2, usernameOffset);
  388. fbb.addBool(3, object.isDND);
  389. fbb.addBool(4, object.isStick);
  390. fbb.addBool(5, object.isSpecialAttention);
  391. fbb.addOffset(6, bioOffset);
  392. fbb.addOffset(7, phoneOffset);
  393. fbb.addOffset(8, avatarOffset);
  394. fbb.finish(fbb.endTable());
  395. return object.id;
  396. },
  397. objectFromFB: (Store store, ByteData fbData) {
  398. final buffer = fb.BufferContext(fbData);
  399. final rootOffset = buffer.derefObject(0);
  400. final object = User(
  401. const fb.StringReader().vTableGet(buffer, rootOffset, 8, ''),
  402. bio: const fb.StringReader()
  403. .vTableGetNullable(buffer, rootOffset, 16),
  404. phone: const fb.StringReader()
  405. .vTableGetNullable(buffer, rootOffset, 18),
  406. avatar: const fb.StringReader()
  407. .vTableGetNullable(buffer, rootOffset, 20))
  408. ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0)
  409. ..isDND =
  410. const fb.BoolReader().vTableGet(buffer, rootOffset, 10, false)
  411. ..isStick =
  412. const fb.BoolReader().vTableGet(buffer, rootOffset, 12, false)
  413. ..isSpecialAttention =
  414. const fb.BoolReader().vTableGet(buffer, rootOffset, 14, false);
  415. InternalToManyAccess.setRelInfo(object.friends, store,
  416. RelInfo<User>.toMany(2, object.id), store.box<User>());
  417. InternalToManyAccess.setRelInfo(object.messages, store,
  418. RelInfo<User>.toMany(5, object.id), store.box<User>());
  419. InternalToManyAccess.setRelInfo(object.groupMessages, store,
  420. RelInfo<User>.toMany(6, object.id), store.box<User>());
  421. return object;
  422. }),
  423. Group: EntityDefinition<Group>(
  424. model: _entities[3],
  425. toOneRelations: (Group object) => [],
  426. toManyRelations: (Group object) => {
  427. RelInfo<Group>.toMany(3, object.id): object.members,
  428. RelInfo<Group>.toMany(4, object.id): object.messages
  429. },
  430. getId: (Group object) => object.id,
  431. setId: (Group object, int id) {
  432. object.id = id;
  433. },
  434. objectToFB: (Group object, fb.Builder fbb) {
  435. fbb.startTable(2);
  436. fbb.addInt64(0, object.id);
  437. fbb.finish(fbb.endTable());
  438. return object.id;
  439. },
  440. objectFromFB: (Store store, ByteData fbData) {
  441. final buffer = fb.BufferContext(fbData);
  442. final rootOffset = buffer.derefObject(0);
  443. final object = Group()
  444. ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);
  445. InternalToManyAccess.setRelInfo(object.members, store,
  446. RelInfo<Group>.toMany(3, object.id), store.box<Group>());
  447. InternalToManyAccess.setRelInfo(object.messages, store,
  448. RelInfo<Group>.toMany(4, object.id), store.box<Group>());
  449. return object;
  450. }),
  451. GroupMessage: EntityDefinition<GroupMessage>(
  452. model: _entities[4],
  453. toOneRelations: (GroupMessage object) => [object.user, object.group],
  454. toManyRelations: (GroupMessage object) => {},
  455. getId: (GroupMessage object) => object.id,
  456. setId: (GroupMessage object, int id) {
  457. object.id = id;
  458. },
  459. objectToFB: (GroupMessage object, fb.Builder fbb) {
  460. final plaintextOffset = fbb.writeString(object.plaintext);
  461. fbb.startTable(10);
  462. fbb.addInt64(0, object.id);
  463. fbb.addInt64(6, object.user.targetId);
  464. fbb.addInt64(7, object.group.targetId);
  465. fbb.addOffset(8, plaintextOffset);
  466. fbb.finish(fbb.endTable());
  467. return object.id;
  468. },
  469. objectFromFB: (Store store, ByteData fbData) {
  470. final buffer = fb.BufferContext(fbData);
  471. final rootOffset = buffer.derefObject(0);
  472. final object = GroupMessage()
  473. ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0)
  474. ..plaintext =
  475. const fb.StringReader().vTableGet(buffer, rootOffset, 20, '');
  476. object.user.targetId =
  477. const fb.Int64Reader().vTableGet(buffer, rootOffset, 16, 0);
  478. object.user.attach(store);
  479. object.group.targetId =
  480. const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0);
  481. object.group.attach(store);
  482. return object;
  483. }),
  484. FriendShip: EntityDefinition<FriendShip>(
  485. model: _entities[5],
  486. toOneRelations: (FriendShip object) => [object.user0, object.user1],
  487. toManyRelations: (FriendShip object) =>
  488. {RelInfo<FriendShip>.toMany(7, object.id): object.messages},
  489. getId: (FriendShip object) => object.id,
  490. setId: (FriendShip object, int id) {
  491. object.id = id;
  492. },
  493. objectToFB: (FriendShip object, fb.Builder fbb) {
  494. fbb.startTable(6);
  495. fbb.addInt64(0, object.id);
  496. fbb.addInt64(3, object.user0.targetId);
  497. fbb.addInt64(4, object.user1.targetId);
  498. fbb.finish(fbb.endTable());
  499. return object.id;
  500. },
  501. objectFromFB: (Store store, ByteData fbData) {
  502. final buffer = fb.BufferContext(fbData);
  503. final rootOffset = buffer.derefObject(0);
  504. final object = FriendShip()
  505. ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);
  506. object.user0.targetId =
  507. const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0);
  508. object.user0.attach(store);
  509. object.user1.targetId =
  510. const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0);
  511. object.user1.attach(store);
  512. InternalToManyAccess.setRelInfo(
  513. object.messages,
  514. store,
  515. RelInfo<FriendShip>.toMany(7, object.id),
  516. store.box<FriendShip>());
  517. return object;
  518. })
  519. };
  520. return ModelDefinition(model, bindings);
  521. }
  522. /// [Profile] entity fields to define ObjectBox queries.
  523. class Profile_ {
  524. /// see [Profile.id]
  525. static final id = QueryIntegerProperty<Profile>(_entities[0].properties[0]);
  526. /// see [Profile.theme]
  527. static final theme =
  528. QueryIntegerProperty<Profile>(_entities[0].properties[1]);
  529. /// see [Profile.isLogin]
  530. static final isLogin =
  531. QueryBooleanProperty<Profile>(_entities[0].properties[2]);
  532. /// see [Profile.isLogout]
  533. static final isLogout =
  534. QueryBooleanProperty<Profile>(_entities[0].properties[3]);
  535. }
  536. /// [Message] entity fields to define ObjectBox queries.
  537. class Message_ {
  538. /// see [Message.id]
  539. static final id = QueryIntegerProperty<Message>(_entities[1].properties[0]);
  540. /// see [Message.from]
  541. static final from =
  542. QueryRelationToOne<Message, User>(_entities[1].properties[1]);
  543. /// see [Message.to]
  544. static final to =
  545. QueryRelationToOne<Message, User>(_entities[1].properties[2]);
  546. /// see [Message.plaintext]
  547. static final plaintext =
  548. QueryStringProperty<Message>(_entities[1].properties[3]);
  549. }
  550. /// [User] entity fields to define ObjectBox queries.
  551. class User_ {
  552. /// see [User.id]
  553. static final id = QueryIntegerProperty<User>(_entities[2].properties[0]);
  554. /// see [User.username]
  555. static final username = QueryStringProperty<User>(_entities[2].properties[1]);
  556. /// see [User.isDND]
  557. static final isDND = QueryBooleanProperty<User>(_entities[2].properties[2]);
  558. /// see [User.isStick]
  559. static final isStick = QueryBooleanProperty<User>(_entities[2].properties[3]);
  560. /// see [User.isSpecialAttention]
  561. static final isSpecialAttention =
  562. QueryBooleanProperty<User>(_entities[2].properties[4]);
  563. /// see [User.bio]
  564. static final bio = QueryStringProperty<User>(_entities[2].properties[5]);
  565. /// see [User.phone]
  566. static final phone = QueryStringProperty<User>(_entities[2].properties[6]);
  567. /// see [User.avatar]
  568. static final avatar = QueryStringProperty<User>(_entities[2].properties[7]);
  569. /// see [User.friends]
  570. static final friends =
  571. QueryRelationToMany<User, User>(_entities[2].relations[0]);
  572. /// see [User.messages]
  573. static final messages =
  574. QueryRelationToMany<User, Message>(_entities[2].relations[1]);
  575. /// see [User.groupMessages]
  576. static final groupMessages =
  577. QueryRelationToMany<User, GroupMessage>(_entities[2].relations[2]);
  578. }
  579. /// [Group] entity fields to define ObjectBox queries.
  580. class Group_ {
  581. /// see [Group.id]
  582. static final id = QueryIntegerProperty<Group>(_entities[3].properties[0]);
  583. /// see [Group.members]
  584. static final members =
  585. QueryRelationToMany<Group, User>(_entities[3].relations[0]);
  586. /// see [Group.messages]
  587. static final messages =
  588. QueryRelationToMany<Group, GroupMessage>(_entities[3].relations[1]);
  589. }
  590. /// [GroupMessage] entity fields to define ObjectBox queries.
  591. class GroupMessage_ {
  592. /// see [GroupMessage.id]
  593. static final id =
  594. QueryIntegerProperty<GroupMessage>(_entities[4].properties[0]);
  595. /// see [GroupMessage.user]
  596. static final user =
  597. QueryRelationToOne<GroupMessage, User>(_entities[4].properties[1]);
  598. /// see [GroupMessage.group]
  599. static final group =
  600. QueryRelationToOne<GroupMessage, Group>(_entities[4].properties[2]);
  601. /// see [GroupMessage.plaintext]
  602. static final plaintext =
  603. QueryStringProperty<GroupMessage>(_entities[4].properties[3]);
  604. }
  605. /// [FriendShip] entity fields to define ObjectBox queries.
  606. class FriendShip_ {
  607. /// see [FriendShip.id]
  608. static final id =
  609. QueryIntegerProperty<FriendShip>(_entities[5].properties[0]);
  610. /// see [FriendShip.user0]
  611. static final user0 =
  612. QueryRelationToOne<FriendShip, User>(_entities[5].properties[1]);
  613. /// see [FriendShip.user1]
  614. static final user1 =
  615. QueryRelationToOne<FriendShip, User>(_entities[5].properties[2]);
  616. /// see [FriendShip.messages]
  617. static final messages =
  618. QueryRelationToMany<FriendShip, Message>(_entities[5].relations[0]);
  619. }