|
|
@@ -9,7 +9,7 @@ import 'package:objectbox/internal.dart'; // generated code can access "internal
|
|
|
import 'package:objectbox/objectbox.dart';
|
|
|
import 'package:objectbox_flutter_libs/objectbox_flutter_libs.dart';
|
|
|
|
|
|
-import 'model/content.dart';
|
|
|
+import 'model/friendship.dart';
|
|
|
import 'model/group.dart';
|
|
|
import 'model/message.dart';
|
|
|
import 'model/profile.dart';
|
|
|
@@ -21,7 +21,7 @@ final _entities = <ModelEntity>[
|
|
|
ModelEntity(
|
|
|
id: const IdUid(2, 1438354990151910015),
|
|
|
name: 'Profile',
|
|
|
- lastPropertyId: const IdUid(7, 4763561980566319174),
|
|
|
+ lastPropertyId: const IdUid(9, 2124161694143580615),
|
|
|
flags: 0,
|
|
|
properties: <ModelProperty>[
|
|
|
ModelProperty(
|
|
|
@@ -47,24 +47,10 @@ final _entities = <ModelEntity>[
|
|
|
],
|
|
|
relations: <ModelRelation>[],
|
|
|
backlinks: <ModelBacklink>[]),
|
|
|
- ModelEntity(
|
|
|
- id: const IdUid(3, 2132486004932842474),
|
|
|
- name: 'Content',
|
|
|
- lastPropertyId: const IdUid(1, 8861377786907255369),
|
|
|
- flags: 0,
|
|
|
- properties: <ModelProperty>[
|
|
|
- ModelProperty(
|
|
|
- id: const IdUid(1, 8861377786907255369),
|
|
|
- name: 'id',
|
|
|
- type: 6,
|
|
|
- flags: 1)
|
|
|
- ],
|
|
|
- relations: <ModelRelation>[],
|
|
|
- backlinks: <ModelBacklink>[]),
|
|
|
ModelEntity(
|
|
|
id: const IdUid(5, 8880211362757189177),
|
|
|
name: 'Message',
|
|
|
- lastPropertyId: const IdUid(6, 4388824818686674479),
|
|
|
+ lastPropertyId: const IdUid(10, 374576085041052636),
|
|
|
flags: 0,
|
|
|
properties: <ModelProperty>[
|
|
|
ModelProperty(
|
|
|
@@ -73,38 +59,31 @@ final _entities = <ModelEntity>[
|
|
|
type: 6,
|
|
|
flags: 1),
|
|
|
ModelProperty(
|
|
|
- id: const IdUid(2, 7982216815340584307),
|
|
|
+ id: const IdUid(8, 8678749043281739962),
|
|
|
name: 'fromId',
|
|
|
type: 11,
|
|
|
flags: 520,
|
|
|
- indexId: const IdUid(4, 6495021264194887400),
|
|
|
+ indexId: const IdUid(19, 8639940058127995637),
|
|
|
relationTarget: 'User'),
|
|
|
ModelProperty(
|
|
|
- id: const IdUid(3, 7721473969164711791),
|
|
|
+ id: const IdUid(9, 5782107643295328726),
|
|
|
name: 'toId',
|
|
|
type: 11,
|
|
|
flags: 520,
|
|
|
- indexId: const IdUid(5, 5329740598468773345),
|
|
|
+ indexId: const IdUid(20, 304254955908714790),
|
|
|
relationTarget: 'User'),
|
|
|
ModelProperty(
|
|
|
- id: const IdUid(5, 634385368395524800),
|
|
|
- name: 'time',
|
|
|
- type: 6,
|
|
|
- flags: 0),
|
|
|
- ModelProperty(
|
|
|
- id: const IdUid(6, 4388824818686674479),
|
|
|
- name: 'contentId',
|
|
|
- type: 11,
|
|
|
- flags: 520,
|
|
|
- indexId: const IdUid(10, 205849996938840771),
|
|
|
- relationTarget: 'Content')
|
|
|
+ id: const IdUid(10, 374576085041052636),
|
|
|
+ name: 'plaintext',
|
|
|
+ type: 9,
|
|
|
+ flags: 0)
|
|
|
],
|
|
|
relations: <ModelRelation>[],
|
|
|
backlinks: <ModelBacklink>[]),
|
|
|
ModelEntity(
|
|
|
id: const IdUid(6, 6066676571331973763),
|
|
|
name: 'User',
|
|
|
- lastPropertyId: const IdUid(6, 3504407138147737485),
|
|
|
+ lastPropertyId: const IdUid(9, 8156592908306452117),
|
|
|
flags: 0,
|
|
|
properties: <ModelProperty>[
|
|
|
ModelProperty(
|
|
|
@@ -132,6 +111,21 @@ final _entities = <ModelEntity>[
|
|
|
id: const IdUid(6, 3504407138147737485),
|
|
|
name: 'isSpecialAttention',
|
|
|
type: 1,
|
|
|
+ flags: 0),
|
|
|
+ ModelProperty(
|
|
|
+ id: const IdUid(7, 1645455969656989260),
|
|
|
+ name: 'bio',
|
|
|
+ type: 9,
|
|
|
+ flags: 0),
|
|
|
+ ModelProperty(
|
|
|
+ id: const IdUid(8, 1358020543347548551),
|
|
|
+ name: 'phone',
|
|
|
+ type: 9,
|
|
|
+ flags: 0),
|
|
|
+ ModelProperty(
|
|
|
+ id: const IdUid(9, 8156592908306452117),
|
|
|
+ name: 'avatar',
|
|
|
+ type: 9,
|
|
|
flags: 0)
|
|
|
],
|
|
|
relations: <ModelRelation>[
|
|
|
@@ -175,7 +169,7 @@ final _entities = <ModelEntity>[
|
|
|
ModelEntity(
|
|
|
id: const IdUid(8, 8842794649328270120),
|
|
|
name: 'GroupMessage',
|
|
|
- lastPropertyId: const IdUid(6, 5148143939128616318),
|
|
|
+ lastPropertyId: const IdUid(9, 4521061296978960561),
|
|
|
flags: 0,
|
|
|
properties: <ModelProperty>[
|
|
|
ModelProperty(
|
|
|
@@ -184,33 +178,59 @@ final _entities = <ModelEntity>[
|
|
|
type: 6,
|
|
|
flags: 1),
|
|
|
ModelProperty(
|
|
|
- id: const IdUid(2, 5514462395021006262),
|
|
|
- name: 'fromId',
|
|
|
+ id: const IdUid(7, 3385606654272810305),
|
|
|
+ name: 'userId',
|
|
|
type: 11,
|
|
|
flags: 520,
|
|
|
- indexId: const IdUid(7, 5268783855356873237),
|
|
|
+ indexId: const IdUid(17, 8821791717138159999),
|
|
|
relationTarget: 'User'),
|
|
|
ModelProperty(
|
|
|
- id: const IdUid(3, 1148609827653786396),
|
|
|
- name: 'toId',
|
|
|
+ id: const IdUid(8, 3058571589698982963),
|
|
|
+ name: 'groupId',
|
|
|
type: 11,
|
|
|
flags: 520,
|
|
|
- indexId: const IdUid(8, 7769527806721188121),
|
|
|
+ indexId: const IdUid(18, 1064437420014320687),
|
|
|
relationTarget: 'Group'),
|
|
|
ModelProperty(
|
|
|
- id: const IdUid(5, 7501600871221400279),
|
|
|
- name: 'time',
|
|
|
+ id: const IdUid(9, 4521061296978960561),
|
|
|
+ name: 'plaintext',
|
|
|
+ type: 9,
|
|
|
+ flags: 0)
|
|
|
+ ],
|
|
|
+ relations: <ModelRelation>[],
|
|
|
+ backlinks: <ModelBacklink>[]),
|
|
|
+ ModelEntity(
|
|
|
+ id: const IdUid(9, 2478855716396571806),
|
|
|
+ name: 'FriendShip',
|
|
|
+ lastPropertyId: const IdUid(5, 89425193393960797),
|
|
|
+ flags: 0,
|
|
|
+ properties: <ModelProperty>[
|
|
|
+ ModelProperty(
|
|
|
+ id: const IdUid(1, 5265335145979968165),
|
|
|
+ name: 'id',
|
|
|
type: 6,
|
|
|
- flags: 0),
|
|
|
+ flags: 1),
|
|
|
ModelProperty(
|
|
|
- id: const IdUid(6, 5148143939128616318),
|
|
|
- name: 'contentId',
|
|
|
+ id: const IdUid(4, 6943551359011057155),
|
|
|
+ name: 'user0Id',
|
|
|
type: 11,
|
|
|
flags: 520,
|
|
|
- indexId: const IdUid(11, 6309601695170211538),
|
|
|
- relationTarget: 'Content')
|
|
|
+ indexId: const IdUid(15, 6350205891372750325),
|
|
|
+ relationTarget: 'User'),
|
|
|
+ ModelProperty(
|
|
|
+ id: const IdUid(5, 89425193393960797),
|
|
|
+ name: 'user1Id',
|
|
|
+ type: 11,
|
|
|
+ flags: 520,
|
|
|
+ indexId: const IdUid(16, 5223993210314820647),
|
|
|
+ relationTarget: 'User')
|
|
|
+ ],
|
|
|
+ relations: <ModelRelation>[
|
|
|
+ ModelRelation(
|
|
|
+ id: const IdUid(7, 4471061252621927376),
|
|
|
+ name: 'messages',
|
|
|
+ targetId: const IdUid(5, 8880211362757189177))
|
|
|
],
|
|
|
- relations: <ModelRelation>[],
|
|
|
backlinks: <ModelBacklink>[])
|
|
|
];
|
|
|
|
|
|
@@ -234,12 +254,28 @@ Future<Store> openStore(
|
|
|
ModelDefinition getObjectBoxModel() {
|
|
|
final model = ModelInfo(
|
|
|
entities: _entities,
|
|
|
- lastEntityId: const IdUid(8, 8842794649328270120),
|
|
|
- lastIndexId: const IdUid(11, 6309601695170211538),
|
|
|
- lastRelationId: const IdUid(6, 6570620621500888428),
|
|
|
+ lastEntityId: const IdUid(9, 2478855716396571806),
|
|
|
+ lastIndexId: const IdUid(21, 4046871049442788311),
|
|
|
+ lastRelationId: const IdUid(7, 4471061252621927376),
|
|
|
lastSequenceId: const IdUid(0, 0),
|
|
|
- retiredEntityUids: const [3444477729893015694, 5044745765388820377],
|
|
|
- retiredIndexUids: const [2181766053148811865],
|
|
|
+ retiredEntityUids: const [
|
|
|
+ 3444477729893015694,
|
|
|
+ 5044745765388820377,
|
|
|
+ 2132486004932842474
|
|
|
+ ],
|
|
|
+ retiredIndexUids: const [
|
|
|
+ 2181766053148811865,
|
|
|
+ 6495021264194887400,
|
|
|
+ 5329740598468773345,
|
|
|
+ 8703247978603696283,
|
|
|
+ 459640529781791232,
|
|
|
+ 5268783855356873237,
|
|
|
+ 7769527806721188121,
|
|
|
+ 7233565214869368113,
|
|
|
+ 6309601695170211538,
|
|
|
+ 205849996938840771,
|
|
|
+ 4046871049442788311
|
|
|
+ ],
|
|
|
retiredPropertyUids: const [
|
|
|
5463014948149082651,
|
|
|
2305308568754167021,
|
|
|
@@ -251,7 +287,21 @@ ModelDefinition getObjectBoxModel() {
|
|
|
214180290351070734,
|
|
|
7647214962273172849,
|
|
|
6701330857882848509,
|
|
|
- 2182219019195059976
|
|
|
+ 2182219019195059976,
|
|
|
+ 7982216815340584307,
|
|
|
+ 7721473969164711791,
|
|
|
+ 609986407749732855,
|
|
|
+ 8078506595736209118,
|
|
|
+ 5514462395021006262,
|
|
|
+ 1148609827653786396,
|
|
|
+ 7294884137191806532,
|
|
|
+ 7501600871221400279,
|
|
|
+ 5148143939128616318,
|
|
|
+ 634385368395524800,
|
|
|
+ 4388824818686674479,
|
|
|
+ 8861377786907255369,
|
|
|
+ 4222660909971782394,
|
|
|
+ 2124161694143580615
|
|
|
],
|
|
|
retiredRelationUids: const [],
|
|
|
modelVersion: 5,
|
|
|
@@ -268,7 +318,7 @@ ModelDefinition getObjectBoxModel() {
|
|
|
object.id = id;
|
|
|
},
|
|
|
objectToFB: (Profile object, fb.Builder fbb) {
|
|
|
- fbb.startTable(8);
|
|
|
+ fbb.startTable(10);
|
|
|
fbb.addInt64(0, object.id);
|
|
|
fbb.addInt64(1, object.theme);
|
|
|
fbb.addBool(3, object.isLogin);
|
|
|
@@ -288,47 +338,23 @@ ModelDefinition getObjectBoxModel() {
|
|
|
..isLogout =
|
|
|
const fb.BoolReader().vTableGet(buffer, rootOffset, 16, false);
|
|
|
|
|
|
- return object;
|
|
|
- }),
|
|
|
- Content: EntityDefinition<Content>(
|
|
|
- model: _entities[1],
|
|
|
- toOneRelations: (Content object) => [],
|
|
|
- toManyRelations: (Content object) => {},
|
|
|
- getId: (Content object) => object.id,
|
|
|
- setId: (Content object, int id) {
|
|
|
- object.id = id;
|
|
|
- },
|
|
|
- objectToFB: (Content object, fb.Builder fbb) {
|
|
|
- fbb.startTable(2);
|
|
|
- fbb.addInt64(0, object.id);
|
|
|
- fbb.finish(fbb.endTable());
|
|
|
- return object.id;
|
|
|
- },
|
|
|
- objectFromFB: (Store store, ByteData fbData) {
|
|
|
- final buffer = fb.BufferContext(fbData);
|
|
|
- final rootOffset = buffer.derefObject(0);
|
|
|
-
|
|
|
- final object = Content()
|
|
|
- ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);
|
|
|
-
|
|
|
return object;
|
|
|
}),
|
|
|
Message: EntityDefinition<Message>(
|
|
|
- model: _entities[2],
|
|
|
- toOneRelations: (Message object) =>
|
|
|
- [object.from, object.to, object.content],
|
|
|
+ model: _entities[1],
|
|
|
+ toOneRelations: (Message object) => [object.from, object.to],
|
|
|
toManyRelations: (Message object) => {},
|
|
|
getId: (Message object) => object.id,
|
|
|
setId: (Message object, int id) {
|
|
|
object.id = id;
|
|
|
},
|
|
|
objectToFB: (Message object, fb.Builder fbb) {
|
|
|
- fbb.startTable(7);
|
|
|
+ final plaintextOffset = fbb.writeString(object.plaintext);
|
|
|
+ fbb.startTable(11);
|
|
|
fbb.addInt64(0, object.id);
|
|
|
- fbb.addInt64(1, object.from.targetId);
|
|
|
- fbb.addInt64(2, object.to.targetId);
|
|
|
- fbb.addInt64(4, object.time);
|
|
|
- fbb.addInt64(5, object.content.targetId);
|
|
|
+ fbb.addInt64(7, object.from.targetId);
|
|
|
+ fbb.addInt64(8, object.to.targetId);
|
|
|
+ fbb.addOffset(9, plaintextOffset);
|
|
|
fbb.finish(fbb.endTable());
|
|
|
return object.id;
|
|
|
},
|
|
|
@@ -338,21 +364,18 @@ ModelDefinition getObjectBoxModel() {
|
|
|
|
|
|
final object = Message()
|
|
|
..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0)
|
|
|
- ..time =
|
|
|
- const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0);
|
|
|
+ ..plaintext =
|
|
|
+ const fb.StringReader().vTableGet(buffer, rootOffset, 22, '');
|
|
|
object.from.targetId =
|
|
|
- const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0);
|
|
|
+ const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0);
|
|
|
object.from.attach(store);
|
|
|
object.to.targetId =
|
|
|
- const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0);
|
|
|
+ const fb.Int64Reader().vTableGet(buffer, rootOffset, 20, 0);
|
|
|
object.to.attach(store);
|
|
|
- object.content.targetId =
|
|
|
- const fb.Int64Reader().vTableGet(buffer, rootOffset, 14, 0);
|
|
|
- object.content.attach(store);
|
|
|
return object;
|
|
|
}),
|
|
|
User: EntityDefinition<User>(
|
|
|
- model: _entities[3],
|
|
|
+ model: _entities[2],
|
|
|
toOneRelations: (User object) => [],
|
|
|
toManyRelations: (User object) => {
|
|
|
RelInfo<User>.toMany(2, object.id): object.friends,
|
|
|
@@ -365,12 +388,21 @@ ModelDefinition getObjectBoxModel() {
|
|
|
},
|
|
|
objectToFB: (User object, fb.Builder fbb) {
|
|
|
final usernameOffset = fbb.writeString(object.username);
|
|
|
- fbb.startTable(7);
|
|
|
+ final bioOffset =
|
|
|
+ object.bio == null ? null : fbb.writeString(object.bio!);
|
|
|
+ final phoneOffset =
|
|
|
+ object.phone == null ? null : fbb.writeString(object.phone!);
|
|
|
+ final avatarOffset =
|
|
|
+ object.avatar == null ? null : fbb.writeString(object.avatar!);
|
|
|
+ fbb.startTable(10);
|
|
|
fbb.addInt64(0, object.id);
|
|
|
fbb.addOffset(2, usernameOffset);
|
|
|
fbb.addBool(3, object.isDND);
|
|
|
fbb.addBool(4, object.isStick);
|
|
|
fbb.addBool(5, object.isSpecialAttention);
|
|
|
+ fbb.addOffset(6, bioOffset);
|
|
|
+ fbb.addOffset(7, phoneOffset);
|
|
|
+ fbb.addOffset(8, avatarOffset);
|
|
|
fbb.finish(fbb.endTable());
|
|
|
return object.id;
|
|
|
},
|
|
|
@@ -379,7 +411,13 @@ ModelDefinition getObjectBoxModel() {
|
|
|
final rootOffset = buffer.derefObject(0);
|
|
|
|
|
|
final object = User(
|
|
|
- const fb.StringReader().vTableGet(buffer, rootOffset, 8, ''))
|
|
|
+ const fb.StringReader().vTableGet(buffer, rootOffset, 8, ''),
|
|
|
+ bio: const fb.StringReader()
|
|
|
+ .vTableGetNullable(buffer, rootOffset, 16),
|
|
|
+ phone: const fb.StringReader()
|
|
|
+ .vTableGetNullable(buffer, rootOffset, 18),
|
|
|
+ avatar: const fb.StringReader()
|
|
|
+ .vTableGetNullable(buffer, rootOffset, 20))
|
|
|
..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0)
|
|
|
..isDND =
|
|
|
const fb.BoolReader().vTableGet(buffer, rootOffset, 10, false)
|
|
|
@@ -396,7 +434,7 @@ ModelDefinition getObjectBoxModel() {
|
|
|
return object;
|
|
|
}),
|
|
|
Group: EntityDefinition<Group>(
|
|
|
- model: _entities[4],
|
|
|
+ model: _entities[3],
|
|
|
toOneRelations: (Group object) => [],
|
|
|
toManyRelations: (Group object) => {
|
|
|
RelInfo<Group>.toMany(3, object.id): object.members,
|
|
|
@@ -425,21 +463,20 @@ ModelDefinition getObjectBoxModel() {
|
|
|
return object;
|
|
|
}),
|
|
|
GroupMessage: EntityDefinition<GroupMessage>(
|
|
|
- model: _entities[5],
|
|
|
- toOneRelations: (GroupMessage object) =>
|
|
|
- [object.from, object.to, object.content],
|
|
|
+ model: _entities[4],
|
|
|
+ toOneRelations: (GroupMessage object) => [object.user, object.group],
|
|
|
toManyRelations: (GroupMessage object) => {},
|
|
|
getId: (GroupMessage object) => object.id,
|
|
|
setId: (GroupMessage object, int id) {
|
|
|
object.id = id;
|
|
|
},
|
|
|
objectToFB: (GroupMessage object, fb.Builder fbb) {
|
|
|
- fbb.startTable(7);
|
|
|
+ final plaintextOffset = fbb.writeString(object.plaintext);
|
|
|
+ fbb.startTable(10);
|
|
|
fbb.addInt64(0, object.id);
|
|
|
- fbb.addInt64(1, object.from.targetId);
|
|
|
- fbb.addInt64(2, object.to.targetId);
|
|
|
- fbb.addInt64(4, object.time);
|
|
|
- fbb.addInt64(5, object.content.targetId);
|
|
|
+ fbb.addInt64(6, object.user.targetId);
|
|
|
+ fbb.addInt64(7, object.group.targetId);
|
|
|
+ fbb.addOffset(8, plaintextOffset);
|
|
|
fbb.finish(fbb.endTable());
|
|
|
return object.id;
|
|
|
},
|
|
|
@@ -449,17 +486,50 @@ ModelDefinition getObjectBoxModel() {
|
|
|
|
|
|
final object = GroupMessage()
|
|
|
..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0)
|
|
|
- ..time =
|
|
|
- const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0);
|
|
|
- object.from.targetId =
|
|
|
- const fb.Int64Reader().vTableGet(buffer, rootOffset, 6, 0);
|
|
|
- object.from.attach(store);
|
|
|
- object.to.targetId =
|
|
|
- const fb.Int64Reader().vTableGet(buffer, rootOffset, 8, 0);
|
|
|
- object.to.attach(store);
|
|
|
- object.content.targetId =
|
|
|
- const fb.Int64Reader().vTableGet(buffer, rootOffset, 14, 0);
|
|
|
- object.content.attach(store);
|
|
|
+ ..plaintext =
|
|
|
+ const fb.StringReader().vTableGet(buffer, rootOffset, 20, '');
|
|
|
+ object.user.targetId =
|
|
|
+ const fb.Int64Reader().vTableGet(buffer, rootOffset, 16, 0);
|
|
|
+ object.user.attach(store);
|
|
|
+ object.group.targetId =
|
|
|
+ const fb.Int64Reader().vTableGet(buffer, rootOffset, 18, 0);
|
|
|
+ object.group.attach(store);
|
|
|
+ return object;
|
|
|
+ }),
|
|
|
+ FriendShip: EntityDefinition<FriendShip>(
|
|
|
+ model: _entities[5],
|
|
|
+ toOneRelations: (FriendShip object) => [object.user0, object.user1],
|
|
|
+ toManyRelations: (FriendShip object) =>
|
|
|
+ {RelInfo<FriendShip>.toMany(7, object.id): object.messages},
|
|
|
+ getId: (FriendShip object) => object.id,
|
|
|
+ setId: (FriendShip object, int id) {
|
|
|
+ object.id = id;
|
|
|
+ },
|
|
|
+ objectToFB: (FriendShip object, fb.Builder fbb) {
|
|
|
+ fbb.startTable(6);
|
|
|
+ fbb.addInt64(0, object.id);
|
|
|
+ fbb.addInt64(3, object.user0.targetId);
|
|
|
+ fbb.addInt64(4, object.user1.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 = FriendShip()
|
|
|
+ ..id = const fb.Int64Reader().vTableGet(buffer, rootOffset, 4, 0);
|
|
|
+ object.user0.targetId =
|
|
|
+ const fb.Int64Reader().vTableGet(buffer, rootOffset, 10, 0);
|
|
|
+ object.user0.attach(store);
|
|
|
+ object.user1.targetId =
|
|
|
+ const fb.Int64Reader().vTableGet(buffer, rootOffset, 12, 0);
|
|
|
+ object.user1.attach(store);
|
|
|
+ InternalToManyAccess.setRelInfo(
|
|
|
+ object.messages,
|
|
|
+ store,
|
|
|
+ RelInfo<FriendShip>.toMany(7, object.id),
|
|
|
+ store.box<FriendShip>());
|
|
|
return object;
|
|
|
})
|
|
|
};
|
|
|
@@ -485,97 +555,112 @@ class Profile_ {
|
|
|
QueryBooleanProperty<Profile>(_entities[0].properties[3]);
|
|
|
}
|
|
|
|
|
|
-/// [Content] entity fields to define ObjectBox queries.
|
|
|
-class Content_ {
|
|
|
- /// see [Content.id]
|
|
|
- static final id = QueryIntegerProperty<Content>(_entities[1].properties[0]);
|
|
|
-}
|
|
|
-
|
|
|
/// [Message] entity fields to define ObjectBox queries.
|
|
|
class Message_ {
|
|
|
/// see [Message.id]
|
|
|
- static final id = QueryIntegerProperty<Message>(_entities[2].properties[0]);
|
|
|
+ static final id = QueryIntegerProperty<Message>(_entities[1].properties[0]);
|
|
|
|
|
|
/// see [Message.from]
|
|
|
static final from =
|
|
|
- QueryRelationToOne<Message, User>(_entities[2].properties[1]);
|
|
|
+ QueryRelationToOne<Message, User>(_entities[1].properties[1]);
|
|
|
|
|
|
/// see [Message.to]
|
|
|
static final to =
|
|
|
- QueryRelationToOne<Message, User>(_entities[2].properties[2]);
|
|
|
-
|
|
|
- /// see [Message.time]
|
|
|
- static final time = QueryIntegerProperty<Message>(_entities[2].properties[3]);
|
|
|
+ QueryRelationToOne<Message, User>(_entities[1].properties[2]);
|
|
|
|
|
|
- /// see [Message.content]
|
|
|
- static final content =
|
|
|
- QueryRelationToOne<Message, Content>(_entities[2].properties[4]);
|
|
|
+ /// see [Message.plaintext]
|
|
|
+ static final plaintext =
|
|
|
+ QueryStringProperty<Message>(_entities[1].properties[3]);
|
|
|
}
|
|
|
|
|
|
/// [User] entity fields to define ObjectBox queries.
|
|
|
class User_ {
|
|
|
/// see [User.id]
|
|
|
- static final id = QueryIntegerProperty<User>(_entities[3].properties[0]);
|
|
|
+ static final id = QueryIntegerProperty<User>(_entities[2].properties[0]);
|
|
|
|
|
|
/// see [User.username]
|
|
|
- static final username = QueryStringProperty<User>(_entities[3].properties[1]);
|
|
|
+ static final username = QueryStringProperty<User>(_entities[2].properties[1]);
|
|
|
|
|
|
/// see [User.isDND]
|
|
|
- static final isDND = QueryBooleanProperty<User>(_entities[3].properties[2]);
|
|
|
+ static final isDND = QueryBooleanProperty<User>(_entities[2].properties[2]);
|
|
|
|
|
|
/// see [User.isStick]
|
|
|
- static final isStick = QueryBooleanProperty<User>(_entities[3].properties[3]);
|
|
|
+ static final isStick = QueryBooleanProperty<User>(_entities[2].properties[3]);
|
|
|
|
|
|
/// see [User.isSpecialAttention]
|
|
|
static final isSpecialAttention =
|
|
|
- QueryBooleanProperty<User>(_entities[3].properties[4]);
|
|
|
+ QueryBooleanProperty<User>(_entities[2].properties[4]);
|
|
|
+
|
|
|
+ /// see [User.bio]
|
|
|
+ static final bio = QueryStringProperty<User>(_entities[2].properties[5]);
|
|
|
+
|
|
|
+ /// see [User.phone]
|
|
|
+ static final phone = QueryStringProperty<User>(_entities[2].properties[6]);
|
|
|
+
|
|
|
+ /// see [User.avatar]
|
|
|
+ static final avatar = QueryStringProperty<User>(_entities[2].properties[7]);
|
|
|
|
|
|
/// see [User.friends]
|
|
|
static final friends =
|
|
|
- QueryRelationToMany<User, User>(_entities[3].relations[0]);
|
|
|
+ QueryRelationToMany<User, User>(_entities[2].relations[0]);
|
|
|
|
|
|
/// see [User.messages]
|
|
|
static final messages =
|
|
|
- QueryRelationToMany<User, Message>(_entities[3].relations[1]);
|
|
|
+ QueryRelationToMany<User, Message>(_entities[2].relations[1]);
|
|
|
|
|
|
/// see [User.groupMessages]
|
|
|
static final groupMessages =
|
|
|
- QueryRelationToMany<User, GroupMessage>(_entities[3].relations[2]);
|
|
|
+ QueryRelationToMany<User, GroupMessage>(_entities[2].relations[2]);
|
|
|
}
|
|
|
|
|
|
/// [Group] entity fields to define ObjectBox queries.
|
|
|
class Group_ {
|
|
|
/// see [Group.id]
|
|
|
- static final id = QueryIntegerProperty<Group>(_entities[4].properties[0]);
|
|
|
+ static final id = QueryIntegerProperty<Group>(_entities[3].properties[0]);
|
|
|
|
|
|
/// see [Group.members]
|
|
|
static final members =
|
|
|
- QueryRelationToMany<Group, User>(_entities[4].relations[0]);
|
|
|
+ QueryRelationToMany<Group, User>(_entities[3].relations[0]);
|
|
|
|
|
|
/// see [Group.messages]
|
|
|
static final messages =
|
|
|
- QueryRelationToMany<Group, GroupMessage>(_entities[4].relations[1]);
|
|
|
+ QueryRelationToMany<Group, GroupMessage>(_entities[3].relations[1]);
|
|
|
}
|
|
|
|
|
|
/// [GroupMessage] entity fields to define ObjectBox queries.
|
|
|
class GroupMessage_ {
|
|
|
/// see [GroupMessage.id]
|
|
|
static final id =
|
|
|
- QueryIntegerProperty<GroupMessage>(_entities[5].properties[0]);
|
|
|
+ QueryIntegerProperty<GroupMessage>(_entities[4].properties[0]);
|
|
|
|
|
|
- /// see [GroupMessage.from]
|
|
|
- static final from =
|
|
|
- QueryRelationToOne<GroupMessage, User>(_entities[5].properties[1]);
|
|
|
+ /// see [GroupMessage.user]
|
|
|
+ static final user =
|
|
|
+ QueryRelationToOne<GroupMessage, User>(_entities[4].properties[1]);
|
|
|
|
|
|
- /// see [GroupMessage.to]
|
|
|
- static final to =
|
|
|
- QueryRelationToOne<GroupMessage, Group>(_entities[5].properties[2]);
|
|
|
+ /// see [GroupMessage.group]
|
|
|
+ static final group =
|
|
|
+ QueryRelationToOne<GroupMessage, Group>(_entities[4].properties[2]);
|
|
|
|
|
|
- /// see [GroupMessage.time]
|
|
|
- static final time =
|
|
|
- QueryIntegerProperty<GroupMessage>(_entities[5].properties[3]);
|
|
|
+ /// see [GroupMessage.plaintext]
|
|
|
+ static final plaintext =
|
|
|
+ QueryStringProperty<GroupMessage>(_entities[4].properties[3]);
|
|
|
+}
|
|
|
+
|
|
|
+/// [FriendShip] entity fields to define ObjectBox queries.
|
|
|
+class FriendShip_ {
|
|
|
+ /// see [FriendShip.id]
|
|
|
+ static final id =
|
|
|
+ QueryIntegerProperty<FriendShip>(_entities[5].properties[0]);
|
|
|
|
|
|
- /// see [GroupMessage.content]
|
|
|
- static final content =
|
|
|
- QueryRelationToOne<GroupMessage, Content>(_entities[5].properties[4]);
|
|
|
+ /// see [FriendShip.user0]
|
|
|
+ static final user0 =
|
|
|
+ QueryRelationToOne<FriendShip, User>(_entities[5].properties[1]);
|
|
|
+
|
|
|
+ /// see [FriendShip.user1]
|
|
|
+ static final user1 =
|
|
|
+ QueryRelationToOne<FriendShip, User>(_entities[5].properties[2]);
|
|
|
+
|
|
|
+ /// see [FriendShip.messages]
|
|
|
+ static final messages =
|
|
|
+ QueryRelationToMany<FriendShip, Message>(_entities[5].relations[0]);
|
|
|
}
|