
Enables offline capabilities and improved data access for stock picking records. API calls now prioritize local ObjectBox storage when offline and persist fetched data upon successful remote retrieval. Introduces comprehensive model-to-entity conversion logic for stock picking data and its related models. Updates UI components and state management to directly consume ObjectBox entities, optimizing data display and interaction. Adjusts ObjectBox entity schema for improved flexibility and adds utility getters.
1087 lines
36 KiB
Dart
1087 lines
36 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// This code was generated by ObjectBox. To update it run the generator again
|
|
// with `dart run build_runner build`.
|
|
// See also https://docs.objectbox.io/getting-started#generate-objectbox-code
|
|
|
|
// ignore_for_file: camel_case_types, depend_on_referenced_packages
|
|
// coverage:ignore-file
|
|
|
|
import 'dart:typed_data';
|
|
|
|
import 'package:flat_buffers/flat_buffers.dart' as fb;
|
|
import 'package:objectbox/internal.dart'
|
|
as obx_int; // generated code can access "internal" functionality
|
|
import 'package:objectbox/objectbox.dart' as obx;
|
|
import 'package:objectbox_flutter_libs/objectbox_flutter_libs.dart';
|
|
|
|
import '../../backend/objectbox/entities/product/product_entity.dart';
|
|
import '../../backend/objectbox/entities/stock_picking/stock_picking_record_entity.dart';
|
|
|
|
export 'package:objectbox/objectbox.dart'; // so that callers only have to import this file
|
|
|
|
final _entities = <obx_int.ModelEntity>[
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(1, 6757833172062715556),
|
|
name: 'ProductEntity',
|
|
lastPropertyId: const obx_int.IdUid(9, 7701820943545445010),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 1853465479129290672),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 129,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(8, 6901756236330116550),
|
|
name: 'barcode',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(9, 7701820943545445010),
|
|
name: 'displayName',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[],
|
|
),
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(2, 673790908095887706),
|
|
name: 'MoveLineWithoutPackageEntity',
|
|
lastPropertyId: const obx_int.IdUid(4, 7045265601292522675),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 7934131837747148014),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 129,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(2, 737277163799462927),
|
|
name: 'quantity',
|
|
type: 8,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(3, 4626825209225121270),
|
|
name: 'productIdId',
|
|
type: 11,
|
|
flags: 520,
|
|
indexId: const obx_int.IdUid(1, 7071681394524127915),
|
|
relationTarget: 'ProductEntity',
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(4, 7045265601292522675),
|
|
name: 'pickingRecordId',
|
|
type: 11,
|
|
flags: 520,
|
|
indexId: const obx_int.IdUid(2, 4631744600947232531),
|
|
relationTarget: 'StockPickingRecordEntity',
|
|
),
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[],
|
|
),
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(3, 5911895131928309407),
|
|
name: 'MoveWithoutPackageEntity',
|
|
lastPropertyId: const obx_int.IdUid(5, 2868736624061308702),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 7495772922288855196),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 129,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(2, 8022763242628208701),
|
|
name: 'quantity',
|
|
type: 8,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(3, 9073127820683437794),
|
|
name: 'productUomQty',
|
|
type: 8,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(4, 3070487482034153510),
|
|
name: 'productIdId',
|
|
type: 11,
|
|
flags: 520,
|
|
indexId: const obx_int.IdUid(3, 441651016758530739),
|
|
relationTarget: 'ProductEntity',
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(5, 2868736624061308702),
|
|
name: 'pickingRecordId',
|
|
type: 11,
|
|
flags: 520,
|
|
indexId: const obx_int.IdUid(4, 6923911202280708393),
|
|
relationTarget: 'StockPickingRecordEntity',
|
|
),
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[],
|
|
),
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(4, 8757910094360234273),
|
|
name: 'StockPickingCompanyEntity',
|
|
lastPropertyId: const obx_int.IdUid(1, 5995202216321049808),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 5995202216321049808),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 129,
|
|
),
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[],
|
|
),
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(5, 8918527105498569432),
|
|
name: 'StockPickingLocationEntity',
|
|
lastPropertyId: const obx_int.IdUid(2, 2076233072143912254),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 6726281234363489051),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 129,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(2, 2076233072143912254),
|
|
name: 'completeName',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[],
|
|
),
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(6, 1548781270490936359),
|
|
name: 'StockPickingPartnerEntity',
|
|
lastPropertyId: const obx_int.IdUid(2, 5577243298577858488),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 8723821334114412330),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 129,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(2, 5577243298577858488),
|
|
name: 'displayName',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[],
|
|
),
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(7, 7263194599189060077),
|
|
name: 'StockPickingRecordEntity',
|
|
lastPropertyId: const obx_int.IdUid(26, 6083080926308657518),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 2654417085953427052),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 129,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(2, 8756939767516224486),
|
|
name: 'priority',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(3, 3369804361769472815),
|
|
name: 'name',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(4, 2393526011733286675),
|
|
name: 'pickingTypeCode',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(5, 4127154830449634720),
|
|
name: 'state',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(6, 6620442281568445377),
|
|
name: 'origin',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(7, 1340319564044185560),
|
|
name: 'useCreateLots',
|
|
type: 1,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(8, 6701136900032669346),
|
|
name: 'isLocked',
|
|
type: 1,
|
|
flags: 0,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(22, 3555343810963543340),
|
|
name: 'companyIdId',
|
|
type: 11,
|
|
flags: 520,
|
|
indexId: const obx_int.IdUid(5, 5996814429272913387),
|
|
relationTarget: 'StockPickingCompanyEntity',
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(23, 2067275890571807819),
|
|
name: 'partnerIdId',
|
|
type: 11,
|
|
flags: 520,
|
|
indexId: const obx_int.IdUid(6, 1163594090984806707),
|
|
relationTarget: 'StockPickingPartnerEntity',
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(24, 8250495144943908234),
|
|
name: 'locationIdId',
|
|
type: 11,
|
|
flags: 520,
|
|
indexId: const obx_int.IdUid(7, 8476282527882628674),
|
|
relationTarget: 'StockPickingLocationEntity',
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(25, 971968364663317028),
|
|
name: 'locationDestIdId',
|
|
type: 11,
|
|
flags: 520,
|
|
indexId: const obx_int.IdUid(8, 4895364176354109789),
|
|
relationTarget: 'StockPickingLocationEntity',
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(26, 6083080926308657518),
|
|
name: 'pickingTypeIdId',
|
|
type: 11,
|
|
flags: 520,
|
|
indexId: const obx_int.IdUid(9, 5054232387620309172),
|
|
relationTarget: 'StockPickingTypeEntity',
|
|
),
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[
|
|
obx_int.ModelBacklink(
|
|
name: 'moveLineIdsWithoutPackage',
|
|
srcEntity: 'MoveLineWithoutPackageEntity',
|
|
srcField: 'pickingRecord',
|
|
),
|
|
obx_int.ModelBacklink(
|
|
name: 'moveIdsWithoutPackage',
|
|
srcEntity: 'MoveWithoutPackageEntity',
|
|
srcField: 'pickingRecord',
|
|
),
|
|
],
|
|
),
|
|
obx_int.ModelEntity(
|
|
id: const obx_int.IdUid(8, 1447656502749776913),
|
|
name: 'StockPickingTypeEntity',
|
|
lastPropertyId: const obx_int.IdUid(2, 2951740471908102089),
|
|
flags: 0,
|
|
properties: <obx_int.ModelProperty>[
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(1, 4042762128325500437),
|
|
name: 'id',
|
|
type: 6,
|
|
flags: 129,
|
|
),
|
|
obx_int.ModelProperty(
|
|
id: const obx_int.IdUid(2, 2951740471908102089),
|
|
name: 'displayName',
|
|
type: 9,
|
|
flags: 0,
|
|
),
|
|
],
|
|
relations: <obx_int.ModelRelation>[],
|
|
backlinks: <obx_int.ModelBacklink>[],
|
|
),
|
|
];
|
|
|
|
/// Shortcut for [obx.Store.new] that passes [getObjectBoxModel] and for Flutter
|
|
/// apps by default a [directory] using `defaultStoreDirectory()` from the
|
|
/// ObjectBox Flutter library.
|
|
///
|
|
/// Note: for desktop apps it is recommended to specify a unique [directory].
|
|
///
|
|
/// See [obx.Store.new] for an explanation of all parameters.
|
|
///
|
|
/// For Flutter apps, also calls `loadObjectBoxLibraryAndroidCompat()` from
|
|
/// the ObjectBox Flutter library to fix loading the native ObjectBox library
|
|
/// on Android 6 and older.
|
|
Future<obx.Store> openStore({
|
|
String? directory,
|
|
int? maxDBSizeInKB,
|
|
int? maxDataSizeInKB,
|
|
int? fileMode,
|
|
int? maxReaders,
|
|
bool queriesCaseSensitiveDefault = true,
|
|
String? macosApplicationGroup,
|
|
}) async {
|
|
await loadObjectBoxLibraryAndroidCompat();
|
|
return obx.Store(
|
|
getObjectBoxModel(),
|
|
directory: directory ?? (await defaultStoreDirectory()).path,
|
|
maxDBSizeInKB: maxDBSizeInKB,
|
|
maxDataSizeInKB: maxDataSizeInKB,
|
|
fileMode: fileMode,
|
|
maxReaders: maxReaders,
|
|
queriesCaseSensitiveDefault: queriesCaseSensitiveDefault,
|
|
macosApplicationGroup: macosApplicationGroup,
|
|
);
|
|
}
|
|
|
|
/// Returns the ObjectBox model definition for this project for use with
|
|
/// [obx.Store.new].
|
|
obx_int.ModelDefinition getObjectBoxModel() {
|
|
final model = obx_int.ModelInfo(
|
|
entities: _entities,
|
|
lastEntityId: const obx_int.IdUid(8, 1447656502749776913),
|
|
lastIndexId: const obx_int.IdUid(9, 5054232387620309172),
|
|
lastRelationId: const obx_int.IdUid(0, 0),
|
|
lastSequenceId: const obx_int.IdUid(0, 0),
|
|
retiredEntityUids: const [],
|
|
retiredIndexUids: const [],
|
|
retiredPropertyUids: const [
|
|
4521897043130066476,
|
|
2561289170534233438,
|
|
6084891210993334692,
|
|
883454706727408240,
|
|
7033704955625644592,
|
|
1825580906382154543,
|
|
6827379535582901480,
|
|
370251402703013746,
|
|
388273829313485427,
|
|
8017891142234531346,
|
|
2254687830363854428,
|
|
6345179288704462624,
|
|
5524107603050624969,
|
|
6595911006479461694,
|
|
6060229724899750987,
|
|
2889425908429352139,
|
|
934877054574553245,
|
|
7012525525648469072,
|
|
4739641817802949530,
|
|
],
|
|
retiredRelationUids: const [],
|
|
modelVersion: 5,
|
|
modelVersionParserMinimum: 5,
|
|
version: 1,
|
|
);
|
|
|
|
final bindings = <Type, obx_int.EntityDefinition>{
|
|
ProductEntity: obx_int.EntityDefinition<ProductEntity>(
|
|
model: _entities[0],
|
|
toOneRelations: (ProductEntity object) => [],
|
|
toManyRelations: (ProductEntity object) => {},
|
|
getId: (ProductEntity object) => object.id,
|
|
setId: (ProductEntity object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (ProductEntity object, fb.Builder fbb) {
|
|
final barcodeOffset = object.barcode == null
|
|
? null
|
|
: fbb.writeString(object.barcode!);
|
|
final displayNameOffset = object.displayName == null
|
|
? null
|
|
: fbb.writeString(object.displayName!);
|
|
fbb.startTable(10);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.addOffset(7, barcodeOffset);
|
|
fbb.addOffset(8, displayNameOffset);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final idParam = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
4,
|
|
0,
|
|
);
|
|
final barcodeParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 18);
|
|
final displayNameParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 20);
|
|
final object = ProductEntity(
|
|
id: idParam,
|
|
barcode: barcodeParam,
|
|
displayName: displayNameParam,
|
|
);
|
|
|
|
return object;
|
|
},
|
|
),
|
|
MoveLineWithoutPackageEntity:
|
|
obx_int.EntityDefinition<MoveLineWithoutPackageEntity>(
|
|
model: _entities[1],
|
|
toOneRelations: (MoveLineWithoutPackageEntity object) => [
|
|
object.productId,
|
|
object.pickingRecord,
|
|
],
|
|
toManyRelations: (MoveLineWithoutPackageEntity object) => {},
|
|
getId: (MoveLineWithoutPackageEntity object) => object.id,
|
|
setId: (MoveLineWithoutPackageEntity object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (MoveLineWithoutPackageEntity object, fb.Builder fbb) {
|
|
fbb.startTable(5);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.addFloat64(1, object.quantity);
|
|
fbb.addInt64(2, object.productId.targetId);
|
|
fbb.addInt64(3, object.pickingRecord.targetId);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final idParam = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
4,
|
|
0,
|
|
);
|
|
final quantityParam = const fb.Float64Reader().vTableGetNullable(
|
|
buffer,
|
|
rootOffset,
|
|
6,
|
|
);
|
|
final object = MoveLineWithoutPackageEntity(
|
|
id: idParam,
|
|
quantity: quantityParam,
|
|
);
|
|
object.productId.targetId = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
8,
|
|
0,
|
|
);
|
|
object.productId.attach(store);
|
|
object.pickingRecord.targetId = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
10,
|
|
0,
|
|
);
|
|
object.pickingRecord.attach(store);
|
|
return object;
|
|
},
|
|
),
|
|
MoveWithoutPackageEntity:
|
|
obx_int.EntityDefinition<MoveWithoutPackageEntity>(
|
|
model: _entities[2],
|
|
toOneRelations: (MoveWithoutPackageEntity object) => [
|
|
object.productId,
|
|
object.pickingRecord,
|
|
],
|
|
toManyRelations: (MoveWithoutPackageEntity object) => {},
|
|
getId: (MoveWithoutPackageEntity object) => object.id,
|
|
setId: (MoveWithoutPackageEntity object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (MoveWithoutPackageEntity object, fb.Builder fbb) {
|
|
fbb.startTable(6);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.addFloat64(1, object.quantity);
|
|
fbb.addFloat64(2, object.productUomQty);
|
|
fbb.addInt64(3, object.productId.targetId);
|
|
fbb.addInt64(4, object.pickingRecord.targetId);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final idParam = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
4,
|
|
0,
|
|
);
|
|
final quantityParam = const fb.Float64Reader().vTableGetNullable(
|
|
buffer,
|
|
rootOffset,
|
|
6,
|
|
);
|
|
final productUomQtyParam = const fb.Float64Reader()
|
|
.vTableGetNullable(buffer, rootOffset, 8);
|
|
final object = MoveWithoutPackageEntity(
|
|
id: idParam,
|
|
quantity: quantityParam,
|
|
productUomQty: productUomQtyParam,
|
|
);
|
|
object.productId.targetId = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
10,
|
|
0,
|
|
);
|
|
object.productId.attach(store);
|
|
object.pickingRecord.targetId = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
12,
|
|
0,
|
|
);
|
|
object.pickingRecord.attach(store);
|
|
return object;
|
|
},
|
|
),
|
|
StockPickingCompanyEntity:
|
|
obx_int.EntityDefinition<StockPickingCompanyEntity>(
|
|
model: _entities[3],
|
|
toOneRelations: (StockPickingCompanyEntity object) => [],
|
|
toManyRelations: (StockPickingCompanyEntity object) => {},
|
|
getId: (StockPickingCompanyEntity object) => object.id,
|
|
setId: (StockPickingCompanyEntity object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (StockPickingCompanyEntity object, fb.Builder fbb) {
|
|
fbb.startTable(2);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final idParam = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
4,
|
|
0,
|
|
);
|
|
final object = StockPickingCompanyEntity(id: idParam);
|
|
|
|
return object;
|
|
},
|
|
),
|
|
StockPickingLocationEntity:
|
|
obx_int.EntityDefinition<StockPickingLocationEntity>(
|
|
model: _entities[4],
|
|
toOneRelations: (StockPickingLocationEntity object) => [],
|
|
toManyRelations: (StockPickingLocationEntity object) => {},
|
|
getId: (StockPickingLocationEntity object) => object.id,
|
|
setId: (StockPickingLocationEntity object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (StockPickingLocationEntity object, fb.Builder fbb) {
|
|
final completeNameOffset = object.completeName == null
|
|
? null
|
|
: fbb.writeString(object.completeName!);
|
|
fbb.startTable(3);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.addOffset(1, completeNameOffset);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final idParam = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
4,
|
|
0,
|
|
);
|
|
final completeNameParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 6);
|
|
final object = StockPickingLocationEntity(
|
|
id: idParam,
|
|
completeName: completeNameParam,
|
|
);
|
|
|
|
return object;
|
|
},
|
|
),
|
|
StockPickingPartnerEntity:
|
|
obx_int.EntityDefinition<StockPickingPartnerEntity>(
|
|
model: _entities[5],
|
|
toOneRelations: (StockPickingPartnerEntity object) => [],
|
|
toManyRelations: (StockPickingPartnerEntity object) => {},
|
|
getId: (StockPickingPartnerEntity object) => object.id,
|
|
setId: (StockPickingPartnerEntity object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (StockPickingPartnerEntity object, fb.Builder fbb) {
|
|
final displayNameOffset = object.displayName == null
|
|
? null
|
|
: fbb.writeString(object.displayName!);
|
|
fbb.startTable(3);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.addOffset(1, displayNameOffset);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final idParam = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
4,
|
|
0,
|
|
);
|
|
final displayNameParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 6);
|
|
final object = StockPickingPartnerEntity(
|
|
id: idParam,
|
|
displayName: displayNameParam,
|
|
);
|
|
|
|
return object;
|
|
},
|
|
),
|
|
StockPickingRecordEntity:
|
|
obx_int.EntityDefinition<StockPickingRecordEntity>(
|
|
model: _entities[6],
|
|
toOneRelations: (StockPickingRecordEntity object) => [
|
|
object.companyId,
|
|
object.partnerId,
|
|
object.locationId,
|
|
object.locationDestId,
|
|
object.pickingTypeId,
|
|
],
|
|
toManyRelations: (StockPickingRecordEntity object) => {
|
|
obx_int.RelInfo<MoveLineWithoutPackageEntity>.toOneBacklink(
|
|
4,
|
|
object.id,
|
|
(MoveLineWithoutPackageEntity srcObject) =>
|
|
srcObject.pickingRecord,
|
|
): object.moveLineIdsWithoutPackage,
|
|
obx_int.RelInfo<MoveWithoutPackageEntity>.toOneBacklink(
|
|
5,
|
|
object.id,
|
|
(MoveWithoutPackageEntity srcObject) => srcObject.pickingRecord,
|
|
): object.moveIdsWithoutPackage,
|
|
},
|
|
getId: (StockPickingRecordEntity object) => object.id,
|
|
setId: (StockPickingRecordEntity object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (StockPickingRecordEntity object, fb.Builder fbb) {
|
|
final priorityOffset = object.priority == null
|
|
? null
|
|
: fbb.writeString(object.priority!);
|
|
final nameOffset = object.name == null
|
|
? null
|
|
: fbb.writeString(object.name!);
|
|
final pickingTypeCodeOffset = object.pickingTypeCode == null
|
|
? null
|
|
: fbb.writeString(object.pickingTypeCode!);
|
|
final stateOffset = object.state == null
|
|
? null
|
|
: fbb.writeString(object.state!);
|
|
final originOffset = object.origin == null
|
|
? null
|
|
: fbb.writeString(object.origin!);
|
|
fbb.startTable(27);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.addOffset(1, priorityOffset);
|
|
fbb.addOffset(2, nameOffset);
|
|
fbb.addOffset(3, pickingTypeCodeOffset);
|
|
fbb.addOffset(4, stateOffset);
|
|
fbb.addOffset(5, originOffset);
|
|
fbb.addBool(6, object.useCreateLots);
|
|
fbb.addBool(7, object.isLocked);
|
|
fbb.addInt64(21, object.companyId.targetId);
|
|
fbb.addInt64(22, object.partnerId.targetId);
|
|
fbb.addInt64(23, object.locationId.targetId);
|
|
fbb.addInt64(24, object.locationDestId.targetId);
|
|
fbb.addInt64(25, object.pickingTypeId.targetId);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final idParam = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
4,
|
|
0,
|
|
);
|
|
final priorityParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 6);
|
|
final nameParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 8);
|
|
final pickingTypeCodeParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 10);
|
|
final stateParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 12);
|
|
final originParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 14);
|
|
final useCreateLotsParam = const fb.BoolReader().vTableGetNullable(
|
|
buffer,
|
|
rootOffset,
|
|
16,
|
|
);
|
|
final isLockedParam = const fb.BoolReader().vTableGetNullable(
|
|
buffer,
|
|
rootOffset,
|
|
18,
|
|
);
|
|
final object = StockPickingRecordEntity(
|
|
id: idParam,
|
|
priority: priorityParam,
|
|
name: nameParam,
|
|
pickingTypeCode: pickingTypeCodeParam,
|
|
state: stateParam,
|
|
origin: originParam,
|
|
useCreateLots: useCreateLotsParam,
|
|
isLocked: isLockedParam,
|
|
);
|
|
object.companyId.targetId = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
46,
|
|
0,
|
|
);
|
|
object.companyId.attach(store);
|
|
object.partnerId.targetId = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
48,
|
|
0,
|
|
);
|
|
object.partnerId.attach(store);
|
|
object.locationId.targetId = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
50,
|
|
0,
|
|
);
|
|
object.locationId.attach(store);
|
|
object.locationDestId.targetId = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
52,
|
|
0,
|
|
);
|
|
object.locationDestId.attach(store);
|
|
object.pickingTypeId.targetId = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
54,
|
|
0,
|
|
);
|
|
object.pickingTypeId.attach(store);
|
|
obx_int.InternalToManyAccess.setRelInfo<StockPickingRecordEntity>(
|
|
object.moveLineIdsWithoutPackage,
|
|
store,
|
|
obx_int.RelInfo<MoveLineWithoutPackageEntity>.toOneBacklink(
|
|
4,
|
|
object.id,
|
|
(MoveLineWithoutPackageEntity srcObject) =>
|
|
srcObject.pickingRecord,
|
|
),
|
|
);
|
|
obx_int.InternalToManyAccess.setRelInfo<StockPickingRecordEntity>(
|
|
object.moveIdsWithoutPackage,
|
|
store,
|
|
obx_int.RelInfo<MoveWithoutPackageEntity>.toOneBacklink(
|
|
5,
|
|
object.id,
|
|
(MoveWithoutPackageEntity srcObject) => srcObject.pickingRecord,
|
|
),
|
|
);
|
|
return object;
|
|
},
|
|
),
|
|
StockPickingTypeEntity: obx_int.EntityDefinition<StockPickingTypeEntity>(
|
|
model: _entities[7],
|
|
toOneRelations: (StockPickingTypeEntity object) => [],
|
|
toManyRelations: (StockPickingTypeEntity object) => {},
|
|
getId: (StockPickingTypeEntity object) => object.id,
|
|
setId: (StockPickingTypeEntity object, int id) {
|
|
object.id = id;
|
|
},
|
|
objectToFB: (StockPickingTypeEntity object, fb.Builder fbb) {
|
|
final displayNameOffset = object.displayName == null
|
|
? null
|
|
: fbb.writeString(object.displayName!);
|
|
fbb.startTable(3);
|
|
fbb.addInt64(0, object.id);
|
|
fbb.addOffset(1, displayNameOffset);
|
|
fbb.finish(fbb.endTable());
|
|
return object.id;
|
|
},
|
|
objectFromFB: (obx.Store store, ByteData fbData) {
|
|
final buffer = fb.BufferContext(fbData);
|
|
final rootOffset = buffer.derefObject(0);
|
|
final idParam = const fb.Int64Reader().vTableGet(
|
|
buffer,
|
|
rootOffset,
|
|
4,
|
|
0,
|
|
);
|
|
final displayNameParam = const fb.StringReader(
|
|
asciiOptimization: true,
|
|
).vTableGetNullable(buffer, rootOffset, 6);
|
|
final object = StockPickingTypeEntity(
|
|
id: idParam,
|
|
displayName: displayNameParam,
|
|
);
|
|
|
|
return object;
|
|
},
|
|
),
|
|
};
|
|
|
|
return obx_int.ModelDefinition(model, bindings);
|
|
}
|
|
|
|
/// [ProductEntity] entity fields to define ObjectBox queries.
|
|
class ProductEntity_ {
|
|
/// See [ProductEntity.id].
|
|
static final id = obx.QueryIntegerProperty<ProductEntity>(
|
|
_entities[0].properties[0],
|
|
);
|
|
|
|
/// See [ProductEntity.barcode].
|
|
static final barcode = obx.QueryStringProperty<ProductEntity>(
|
|
_entities[0].properties[1],
|
|
);
|
|
|
|
/// See [ProductEntity.displayName].
|
|
static final displayName = obx.QueryStringProperty<ProductEntity>(
|
|
_entities[0].properties[2],
|
|
);
|
|
}
|
|
|
|
/// [MoveLineWithoutPackageEntity] entity fields to define ObjectBox queries.
|
|
class MoveLineWithoutPackageEntity_ {
|
|
/// See [MoveLineWithoutPackageEntity.id].
|
|
static final id = obx.QueryIntegerProperty<MoveLineWithoutPackageEntity>(
|
|
_entities[1].properties[0],
|
|
);
|
|
|
|
/// See [MoveLineWithoutPackageEntity.quantity].
|
|
static final quantity = obx.QueryDoubleProperty<MoveLineWithoutPackageEntity>(
|
|
_entities[1].properties[1],
|
|
);
|
|
|
|
/// See [MoveLineWithoutPackageEntity.productId].
|
|
static final productId =
|
|
obx.QueryRelationToOne<MoveLineWithoutPackageEntity, ProductEntity>(
|
|
_entities[1].properties[2],
|
|
);
|
|
|
|
/// See [MoveLineWithoutPackageEntity.pickingRecord].
|
|
static final pickingRecord =
|
|
obx.QueryRelationToOne<
|
|
MoveLineWithoutPackageEntity,
|
|
StockPickingRecordEntity
|
|
>(_entities[1].properties[3]);
|
|
}
|
|
|
|
/// [MoveWithoutPackageEntity] entity fields to define ObjectBox queries.
|
|
class MoveWithoutPackageEntity_ {
|
|
/// See [MoveWithoutPackageEntity.id].
|
|
static final id = obx.QueryIntegerProperty<MoveWithoutPackageEntity>(
|
|
_entities[2].properties[0],
|
|
);
|
|
|
|
/// See [MoveWithoutPackageEntity.quantity].
|
|
static final quantity = obx.QueryDoubleProperty<MoveWithoutPackageEntity>(
|
|
_entities[2].properties[1],
|
|
);
|
|
|
|
/// See [MoveWithoutPackageEntity.productUomQty].
|
|
static final productUomQty =
|
|
obx.QueryDoubleProperty<MoveWithoutPackageEntity>(
|
|
_entities[2].properties[2],
|
|
);
|
|
|
|
/// See [MoveWithoutPackageEntity.productId].
|
|
static final productId =
|
|
obx.QueryRelationToOne<MoveWithoutPackageEntity, ProductEntity>(
|
|
_entities[2].properties[3],
|
|
);
|
|
|
|
/// See [MoveWithoutPackageEntity.pickingRecord].
|
|
static final pickingRecord =
|
|
obx.QueryRelationToOne<
|
|
MoveWithoutPackageEntity,
|
|
StockPickingRecordEntity
|
|
>(_entities[2].properties[4]);
|
|
}
|
|
|
|
/// [StockPickingCompanyEntity] entity fields to define ObjectBox queries.
|
|
class StockPickingCompanyEntity_ {
|
|
/// See [StockPickingCompanyEntity.id].
|
|
static final id = obx.QueryIntegerProperty<StockPickingCompanyEntity>(
|
|
_entities[3].properties[0],
|
|
);
|
|
}
|
|
|
|
/// [StockPickingLocationEntity] entity fields to define ObjectBox queries.
|
|
class StockPickingLocationEntity_ {
|
|
/// See [StockPickingLocationEntity.id].
|
|
static final id = obx.QueryIntegerProperty<StockPickingLocationEntity>(
|
|
_entities[4].properties[0],
|
|
);
|
|
|
|
/// See [StockPickingLocationEntity.completeName].
|
|
static final completeName =
|
|
obx.QueryStringProperty<StockPickingLocationEntity>(
|
|
_entities[4].properties[1],
|
|
);
|
|
}
|
|
|
|
/// [StockPickingPartnerEntity] entity fields to define ObjectBox queries.
|
|
class StockPickingPartnerEntity_ {
|
|
/// See [StockPickingPartnerEntity.id].
|
|
static final id = obx.QueryIntegerProperty<StockPickingPartnerEntity>(
|
|
_entities[5].properties[0],
|
|
);
|
|
|
|
/// See [StockPickingPartnerEntity.displayName].
|
|
static final displayName = obx.QueryStringProperty<StockPickingPartnerEntity>(
|
|
_entities[5].properties[1],
|
|
);
|
|
}
|
|
|
|
/// [StockPickingRecordEntity] entity fields to define ObjectBox queries.
|
|
class StockPickingRecordEntity_ {
|
|
/// See [StockPickingRecordEntity.id].
|
|
static final id = obx.QueryIntegerProperty<StockPickingRecordEntity>(
|
|
_entities[6].properties[0],
|
|
);
|
|
|
|
/// See [StockPickingRecordEntity.priority].
|
|
static final priority = obx.QueryStringProperty<StockPickingRecordEntity>(
|
|
_entities[6].properties[1],
|
|
);
|
|
|
|
/// See [StockPickingRecordEntity.name].
|
|
static final name = obx.QueryStringProperty<StockPickingRecordEntity>(
|
|
_entities[6].properties[2],
|
|
);
|
|
|
|
/// See [StockPickingRecordEntity.pickingTypeCode].
|
|
static final pickingTypeCode =
|
|
obx.QueryStringProperty<StockPickingRecordEntity>(
|
|
_entities[6].properties[3],
|
|
);
|
|
|
|
/// See [StockPickingRecordEntity.state].
|
|
static final state = obx.QueryStringProperty<StockPickingRecordEntity>(
|
|
_entities[6].properties[4],
|
|
);
|
|
|
|
/// See [StockPickingRecordEntity.origin].
|
|
static final origin = obx.QueryStringProperty<StockPickingRecordEntity>(
|
|
_entities[6].properties[5],
|
|
);
|
|
|
|
/// See [StockPickingRecordEntity.useCreateLots].
|
|
static final useCreateLots =
|
|
obx.QueryBooleanProperty<StockPickingRecordEntity>(
|
|
_entities[6].properties[6],
|
|
);
|
|
|
|
/// See [StockPickingRecordEntity.isLocked].
|
|
static final isLocked = obx.QueryBooleanProperty<StockPickingRecordEntity>(
|
|
_entities[6].properties[7],
|
|
);
|
|
|
|
/// See [StockPickingRecordEntity.companyId].
|
|
static final companyId =
|
|
obx.QueryRelationToOne<
|
|
StockPickingRecordEntity,
|
|
StockPickingCompanyEntity
|
|
>(_entities[6].properties[8]);
|
|
|
|
/// See [StockPickingRecordEntity.partnerId].
|
|
static final partnerId =
|
|
obx.QueryRelationToOne<
|
|
StockPickingRecordEntity,
|
|
StockPickingPartnerEntity
|
|
>(_entities[6].properties[9]);
|
|
|
|
/// See [StockPickingRecordEntity.locationId].
|
|
static final locationId =
|
|
obx.QueryRelationToOne<
|
|
StockPickingRecordEntity,
|
|
StockPickingLocationEntity
|
|
>(_entities[6].properties[10]);
|
|
|
|
/// See [StockPickingRecordEntity.locationDestId].
|
|
static final locationDestId =
|
|
obx.QueryRelationToOne<
|
|
StockPickingRecordEntity,
|
|
StockPickingLocationEntity
|
|
>(_entities[6].properties[11]);
|
|
|
|
/// See [StockPickingRecordEntity.pickingTypeId].
|
|
static final pickingTypeId =
|
|
obx.QueryRelationToOne<StockPickingRecordEntity, StockPickingTypeEntity>(
|
|
_entities[6].properties[12],
|
|
);
|
|
|
|
/// see [StockPickingRecordEntity.moveLineIdsWithoutPackage]
|
|
static final moveLineIdsWithoutPackage =
|
|
obx.QueryBacklinkToMany<
|
|
MoveLineWithoutPackageEntity,
|
|
StockPickingRecordEntity
|
|
>(MoveLineWithoutPackageEntity_.pickingRecord);
|
|
|
|
/// see [StockPickingRecordEntity.moveIdsWithoutPackage]
|
|
static final moveIdsWithoutPackage =
|
|
obx.QueryBacklinkToMany<
|
|
MoveWithoutPackageEntity,
|
|
StockPickingRecordEntity
|
|
>(MoveWithoutPackageEntity_.pickingRecord);
|
|
}
|
|
|
|
/// [StockPickingTypeEntity] entity fields to define ObjectBox queries.
|
|
class StockPickingTypeEntity_ {
|
|
/// See [StockPickingTypeEntity.id].
|
|
static final id = obx.QueryIntegerProperty<StockPickingTypeEntity>(
|
|
_entities[7].properties[0],
|
|
);
|
|
|
|
/// See [StockPickingTypeEntity.displayName].
|
|
static final displayName = obx.QueryStringProperty<StockPickingTypeEntity>(
|
|
_entities[7].properties[1],
|
|
);
|
|
}
|