diff --git a/lib/backend/objectbox/entities/stock_picking/stock_picking_record_entity.dart b/lib/backend/objectbox/entities/stock_picking/stock_picking_record_entity.dart index 10c363d..032bd23 100644 --- a/lib/backend/objectbox/entities/stock_picking/stock_picking_record_entity.dart +++ b/lib/backend/objectbox/entities/stock_picking/stock_picking_record_entity.dart @@ -1 +1,123 @@ -import 'package:objectbox/objectbox.dart'; \ No newline at end of file +import 'package:e_scan/backend/objectbox/entities/product/product_entity.dart'; +import 'package:objectbox/objectbox.dart'; + +@Entity() +class StockPickingRecordEntity { + StockPickingRecordEntity({ + this.id = 0, + this.priority, + this.name, + this.pickingTypeCode, + this.state, + this.origin, + this.useCreateLots, + this.isLocked, + this.scheduledDate, + this.dateDeadline, + this.dateDone, + this.productsAvailability, + this.productsAvailabilityState, + this.jsonPopover, + this.activityExceptionIcon, + this.activityExceptionDecoration, + this.showCheckAvailability, + this.hasScrapMove, + this.hasPackages, + this.showNextPickings, + this.pickingTypeEntirePacks, + }); + @Id(assignable: true) + int id; + + final String? priority; + final String? name; + final String? pickingTypeCode; + final String? state; + final String? origin; + final bool? useCreateLots; + final bool? isLocked; + final String? scheduledDate; + final String? dateDeadline; + final String? dateDone; + + final String? productsAvailability; + final String? productsAvailabilityState; + + final bool? jsonPopover; + final bool? activityExceptionIcon; + final bool? activityExceptionDecoration; + final bool? showCheckAvailability; + final bool? hasScrapMove; + final bool? hasPackages; + final bool? showNextPickings; + final bool? pickingTypeEntirePacks; + + final ToOne companyId = ToOne(); + final ToOne partnerId = ToOne(); + final ToOne locationId = ToOne(); + final ToOne locationDestId = ToOne(); + final ToOne pickingTypeId = ToOne(); + + @Backlink('pickingRecord') + final ToMany moveLineIdsWithoutPackage = + ToMany(); + + @Backlink('pickingRecord') + final ToMany moveIdsWithoutPackage = ToMany(); +} + +@Entity() +class StockPickingCompanyEntity { + StockPickingCompanyEntity({this.id = 0}); + @Id(assignable: true) + int id; +} + +@Entity() +class StockPickingPartnerEntity { + StockPickingPartnerEntity({this.id = 0, this.displayName}); + @Id(assignable: true) + int id; + final String? displayName; +} + +@Entity() +class StockPickingLocationEntity { + StockPickingLocationEntity({this.id = 0, this.completeName}); + @Id(assignable: true) + int id; + final String? completeName; +} + +@Entity() +class StockPickingTypeEntity { + StockPickingTypeEntity({this.id = 0, this.displayName}); + @Id(assignable: true) + int id; + final String? displayName; +} + +@Entity() +class MoveLineWithoutPackageEntity { + MoveLineWithoutPackageEntity({this.id = 0, this.quantity}); + @Id(assignable: true) + int id; + + final double? quantity; + + final ToOne productId = ToOne(); + final ToOne pickingRecord = ToOne(); +} + +@Entity() +class MoveWithoutPackageEntity { + MoveWithoutPackageEntity({this.id = 0, this.quantity, this.productUomQty}); + @Id(assignable: true) + int id; + + final double? quantity; + final double? productUomQty; + + final ToOne productId = ToOne(); + final ToOne pickingRecord = ToOne(); +} diff --git a/lib/backend/objectbox/objectbox-model.json b/lib/backend/objectbox/objectbox-model.json index 2d4ed97..4c74a75 100644 --- a/lib/backend/objectbox/objectbox-model.json +++ b/lib/backend/objectbox/objectbox-model.json @@ -26,10 +26,310 @@ } ], "relations": [] + }, + { + "id": "2:673790908095887706", + "lastPropertyId": "4:7045265601292522675", + "name": "MoveLineWithoutPackageEntity", + "properties": [ + { + "id": "1:7934131837747148014", + "name": "id", + "type": 6, + "flags": 129 + }, + { + "id": "2:737277163799462927", + "name": "quantity", + "type": 8 + }, + { + "id": "3:4626825209225121270", + "name": "productIdId", + "type": 11, + "flags": 520, + "indexId": "1:7071681394524127915", + "relationTarget": "ProductEntity" + }, + { + "id": "4:7045265601292522675", + "name": "pickingRecordId", + "type": 11, + "flags": 520, + "indexId": "2:4631744600947232531", + "relationTarget": "StockPickingRecordEntity" + } + ], + "relations": [] + }, + { + "id": "3:5911895131928309407", + "lastPropertyId": "5:2868736624061308702", + "name": "MoveWithoutPackageEntity", + "properties": [ + { + "id": "1:7495772922288855196", + "name": "id", + "type": 6, + "flags": 129 + }, + { + "id": "2:8022763242628208701", + "name": "quantity", + "type": 8 + }, + { + "id": "3:9073127820683437794", + "name": "productUomQty", + "type": 8 + }, + { + "id": "4:3070487482034153510", + "name": "productIdId", + "type": 11, + "flags": 520, + "indexId": "3:441651016758530739", + "relationTarget": "ProductEntity" + }, + { + "id": "5:2868736624061308702", + "name": "pickingRecordId", + "type": 11, + "flags": 520, + "indexId": "4:6923911202280708393", + "relationTarget": "StockPickingRecordEntity" + } + ], + "relations": [] + }, + { + "id": "4:8757910094360234273", + "lastPropertyId": "1:5995202216321049808", + "name": "StockPickingCompanyEntity", + "properties": [ + { + "id": "1:5995202216321049808", + "name": "id", + "type": 6, + "flags": 129 + } + ], + "relations": [] + }, + { + "id": "5:8918527105498569432", + "lastPropertyId": "2:2076233072143912254", + "name": "StockPickingLocationEntity", + "properties": [ + { + "id": "1:6726281234363489051", + "name": "id", + "type": 6, + "flags": 129 + }, + { + "id": "2:2076233072143912254", + "name": "completeName", + "type": 9 + } + ], + "relations": [] + }, + { + "id": "6:1548781270490936359", + "lastPropertyId": "2:5577243298577858488", + "name": "StockPickingPartnerEntity", + "properties": [ + { + "id": "1:8723821334114412330", + "name": "id", + "type": 6, + "flags": 129 + }, + { + "id": "2:5577243298577858488", + "name": "displayName", + "type": 9 + } + ], + "relations": [] + }, + { + "id": "7:7263194599189060077", + "lastPropertyId": "26:6083080926308657518", + "name": "StockPickingRecordEntity", + "properties": [ + { + "id": "1:2654417085953427052", + "name": "id", + "type": 6, + "flags": 129 + }, + { + "id": "2:8756939767516224486", + "name": "priority", + "type": 9 + }, + { + "id": "3:3369804361769472815", + "name": "name", + "type": 9 + }, + { + "id": "4:2393526011733286675", + "name": "pickingTypeCode", + "type": 9 + }, + { + "id": "5:4127154830449634720", + "name": "state", + "type": 9 + }, + { + "id": "6:6620442281568445377", + "name": "origin", + "type": 9 + }, + { + "id": "7:1340319564044185560", + "name": "useCreateLots", + "type": 1 + }, + { + "id": "8:6701136900032669346", + "name": "isLocked", + "type": 1 + }, + { + "id": "9:6827379535582901480", + "name": "scheduledDate", + "type": 9 + }, + { + "id": "10:370251402703013746", + "name": "dateDeadline", + "type": 9 + }, + { + "id": "11:388273829313485427", + "name": "dateDone", + "type": 9 + }, + { + "id": "12:8017891142234531346", + "name": "productsAvailability", + "type": 9 + }, + { + "id": "13:2254687830363854428", + "name": "productsAvailabilityState", + "type": 9 + }, + { + "id": "14:6345179288704462624", + "name": "jsonPopover", + "type": 1 + }, + { + "id": "15:5524107603050624969", + "name": "activityExceptionIcon", + "type": 1 + }, + { + "id": "16:6595911006479461694", + "name": "activityExceptionDecoration", + "type": 1 + }, + { + "id": "17:6060229724899750987", + "name": "showCheckAvailability", + "type": 1 + }, + { + "id": "18:2889425908429352139", + "name": "hasScrapMove", + "type": 1 + }, + { + "id": "19:934877054574553245", + "name": "hasPackages", + "type": 1 + }, + { + "id": "20:7012525525648469072", + "name": "showNextPickings", + "type": 1 + }, + { + "id": "21:4739641817802949530", + "name": "pickingTypeEntirePacks", + "type": 1 + }, + { + "id": "22:3555343810963543340", + "name": "companyIdId", + "type": 11, + "flags": 520, + "indexId": "5:5996814429272913387", + "relationTarget": "StockPickingCompanyEntity" + }, + { + "id": "23:2067275890571807819", + "name": "partnerIdId", + "type": 11, + "flags": 520, + "indexId": "6:1163594090984806707", + "relationTarget": "StockPickingPartnerEntity" + }, + { + "id": "24:8250495144943908234", + "name": "locationIdId", + "type": 11, + "flags": 520, + "indexId": "7:8476282527882628674", + "relationTarget": "StockPickingLocationEntity" + }, + { + "id": "25:971968364663317028", + "name": "locationDestIdId", + "type": 11, + "flags": 520, + "indexId": "8:4895364176354109789", + "relationTarget": "StockPickingLocationEntity" + }, + { + "id": "26:6083080926308657518", + "name": "pickingTypeIdId", + "type": 11, + "flags": 520, + "indexId": "9:5054232387620309172", + "relationTarget": "StockPickingTypeEntity" + } + ], + "relations": [] + }, + { + "id": "8:1447656502749776913", + "lastPropertyId": "2:2951740471908102089", + "name": "StockPickingTypeEntity", + "properties": [ + { + "id": "1:4042762128325500437", + "name": "id", + "type": 6, + "flags": 129 + }, + { + "id": "2:2951740471908102089", + "name": "displayName", + "type": 9 + } + ], + "relations": [] } ], - "lastEntityId": "1:6757833172062715556", - "lastIndexId": "0:0", + "lastEntityId": "8:1447656502749776913", + "lastIndexId": "9:5054232387620309172", "lastRelationId": "0:0", "lastSequenceId": "0:0", "modelVersion": 5, diff --git a/lib/backend/objectbox/objectbox.g.dart b/lib/backend/objectbox/objectbox.g.dart index fbe46ea..001cca5 100644 --- a/lib/backend/objectbox/objectbox.g.dart +++ b/lib/backend/objectbox/objectbox.g.dart @@ -15,6 +15,7 @@ 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 @@ -47,6 +48,357 @@ final _entities = [ relations: [], backlinks: [], ), + 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( + 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: [], + backlinks: [], + ), + 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( + 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: [], + backlinks: [], + ), + 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( + id: const obx_int.IdUid(1, 5995202216321049808), + name: 'id', + type: 6, + flags: 129, + ), + ], + relations: [], + backlinks: [], + ), + 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( + 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: [], + backlinks: [], + ), + 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( + 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: [], + backlinks: [], + ), + 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( + 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(9, 6827379535582901480), + name: 'scheduledDate', + type: 9, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(10, 370251402703013746), + name: 'dateDeadline', + type: 9, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(11, 388273829313485427), + name: 'dateDone', + type: 9, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(12, 8017891142234531346), + name: 'productsAvailability', + type: 9, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(13, 2254687830363854428), + name: 'productsAvailabilityState', + type: 9, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(14, 6345179288704462624), + name: 'jsonPopover', + type: 1, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(15, 5524107603050624969), + name: 'activityExceptionIcon', + type: 1, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(16, 6595911006479461694), + name: 'activityExceptionDecoration', + type: 1, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(17, 6060229724899750987), + name: 'showCheckAvailability', + type: 1, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(18, 2889425908429352139), + name: 'hasScrapMove', + type: 1, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(19, 934877054574553245), + name: 'hasPackages', + type: 1, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(20, 7012525525648469072), + name: 'showNextPickings', + type: 1, + flags: 0, + ), + obx_int.ModelProperty( + id: const obx_int.IdUid(21, 4739641817802949530), + name: 'pickingTypeEntirePacks', + 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: [], + backlinks: [ + 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( + 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: [], + backlinks: [], + ), ]; /// Shortcut for [obx.Store.new] that passes [getObjectBoxModel] and for Flutter @@ -87,8 +439,8 @@ Future openStore({ obx_int.ModelDefinition getObjectBoxModel() { final model = obx_int.ModelInfo( entities: _entities, - lastEntityId: const obx_int.IdUid(1, 6757833172062715556), - lastIndexId: const obx_int.IdUid(0, 0), + 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 [], @@ -151,6 +503,511 @@ obx_int.ModelDefinition getObjectBoxModel() { displayName: displayNameParam, ); + return object; + }, + ), + MoveLineWithoutPackageEntity: + obx_int.EntityDefinition( + 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( + 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( + 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( + 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( + 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( + model: _entities[6], + toOneRelations: (StockPickingRecordEntity object) => [ + object.companyId, + object.partnerId, + object.locationId, + object.locationDestId, + object.pickingTypeId, + ], + toManyRelations: (StockPickingRecordEntity object) => { + obx_int.RelInfo.toOneBacklink( + 4, + object.id, + (MoveLineWithoutPackageEntity srcObject) => + srcObject.pickingRecord, + ): object.moveLineIdsWithoutPackage, + obx_int.RelInfo.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!); + final scheduledDateOffset = object.scheduledDate == null + ? null + : fbb.writeString(object.scheduledDate!); + final dateDeadlineOffset = object.dateDeadline == null + ? null + : fbb.writeString(object.dateDeadline!); + final dateDoneOffset = object.dateDone == null + ? null + : fbb.writeString(object.dateDone!); + final productsAvailabilityOffset = + object.productsAvailability == null + ? null + : fbb.writeString(object.productsAvailability!); + final productsAvailabilityStateOffset = + object.productsAvailabilityState == null + ? null + : fbb.writeString(object.productsAvailabilityState!); + 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.addOffset(8, scheduledDateOffset); + fbb.addOffset(9, dateDeadlineOffset); + fbb.addOffset(10, dateDoneOffset); + fbb.addOffset(11, productsAvailabilityOffset); + fbb.addOffset(12, productsAvailabilityStateOffset); + fbb.addBool(13, object.jsonPopover); + fbb.addBool(14, object.activityExceptionIcon); + fbb.addBool(15, object.activityExceptionDecoration); + fbb.addBool(16, object.showCheckAvailability); + fbb.addBool(17, object.hasScrapMove); + fbb.addBool(18, object.hasPackages); + fbb.addBool(19, object.showNextPickings); + fbb.addBool(20, object.pickingTypeEntirePacks); + 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 scheduledDateParam = const fb.StringReader( + asciiOptimization: true, + ).vTableGetNullable(buffer, rootOffset, 20); + final dateDeadlineParam = const fb.StringReader( + asciiOptimization: true, + ).vTableGetNullable(buffer, rootOffset, 22); + final dateDoneParam = const fb.StringReader( + asciiOptimization: true, + ).vTableGetNullable(buffer, rootOffset, 24); + final productsAvailabilityParam = const fb.StringReader( + asciiOptimization: true, + ).vTableGetNullable(buffer, rootOffset, 26); + final productsAvailabilityStateParam = const fb.StringReader( + asciiOptimization: true, + ).vTableGetNullable(buffer, rootOffset, 28); + final jsonPopoverParam = const fb.BoolReader().vTableGetNullable( + buffer, + rootOffset, + 30, + ); + final activityExceptionIconParam = const fb.BoolReader() + .vTableGetNullable(buffer, rootOffset, 32); + final activityExceptionDecorationParam = const fb.BoolReader() + .vTableGetNullable(buffer, rootOffset, 34); + final showCheckAvailabilityParam = const fb.BoolReader() + .vTableGetNullable(buffer, rootOffset, 36); + final hasScrapMoveParam = const fb.BoolReader().vTableGetNullable( + buffer, + rootOffset, + 38, + ); + final hasPackagesParam = const fb.BoolReader().vTableGetNullable( + buffer, + rootOffset, + 40, + ); + final showNextPickingsParam = const fb.BoolReader() + .vTableGetNullable(buffer, rootOffset, 42); + final pickingTypeEntirePacksParam = const fb.BoolReader() + .vTableGetNullable(buffer, rootOffset, 44); + final object = StockPickingRecordEntity( + id: idParam, + priority: priorityParam, + name: nameParam, + pickingTypeCode: pickingTypeCodeParam, + state: stateParam, + origin: originParam, + useCreateLots: useCreateLotsParam, + isLocked: isLockedParam, + scheduledDate: scheduledDateParam, + dateDeadline: dateDeadlineParam, + dateDone: dateDoneParam, + productsAvailability: productsAvailabilityParam, + productsAvailabilityState: productsAvailabilityStateParam, + jsonPopover: jsonPopoverParam, + activityExceptionIcon: activityExceptionIconParam, + activityExceptionDecoration: activityExceptionDecorationParam, + showCheckAvailability: showCheckAvailabilityParam, + hasScrapMove: hasScrapMoveParam, + hasPackages: hasPackagesParam, + showNextPickings: showNextPickingsParam, + pickingTypeEntirePacks: pickingTypeEntirePacksParam, + ); + 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( + object.moveLineIdsWithoutPackage, + store, + obx_int.RelInfo.toOneBacklink( + 4, + object.id, + (MoveLineWithoutPackageEntity srcObject) => + srcObject.pickingRecord, + ), + ); + obx_int.InternalToManyAccess.setRelInfo( + object.moveIdsWithoutPackage, + store, + obx_int.RelInfo.toOneBacklink( + 5, + object.id, + (MoveWithoutPackageEntity srcObject) => srcObject.pickingRecord, + ), + ); + return object; + }, + ), + StockPickingTypeEntity: obx_int.EntityDefinition( + 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; }, ), @@ -176,3 +1033,276 @@ class ProductEntity_ { _entities[0].properties[2], ); } + +/// [MoveLineWithoutPackageEntity] entity fields to define ObjectBox queries. +class MoveLineWithoutPackageEntity_ { + /// See [MoveLineWithoutPackageEntity.id]. + static final id = obx.QueryIntegerProperty( + _entities[1].properties[0], + ); + + /// See [MoveLineWithoutPackageEntity.quantity]. + static final quantity = obx.QueryDoubleProperty( + _entities[1].properties[1], + ); + + /// See [MoveLineWithoutPackageEntity.productId]. + static final productId = + obx.QueryRelationToOne( + _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( + _entities[2].properties[0], + ); + + /// See [MoveWithoutPackageEntity.quantity]. + static final quantity = obx.QueryDoubleProperty( + _entities[2].properties[1], + ); + + /// See [MoveWithoutPackageEntity.productUomQty]. + static final productUomQty = + obx.QueryDoubleProperty( + _entities[2].properties[2], + ); + + /// See [MoveWithoutPackageEntity.productId]. + static final productId = + obx.QueryRelationToOne( + _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( + _entities[3].properties[0], + ); +} + +/// [StockPickingLocationEntity] entity fields to define ObjectBox queries. +class StockPickingLocationEntity_ { + /// See [StockPickingLocationEntity.id]. + static final id = obx.QueryIntegerProperty( + _entities[4].properties[0], + ); + + /// See [StockPickingLocationEntity.completeName]. + static final completeName = + obx.QueryStringProperty( + _entities[4].properties[1], + ); +} + +/// [StockPickingPartnerEntity] entity fields to define ObjectBox queries. +class StockPickingPartnerEntity_ { + /// See [StockPickingPartnerEntity.id]. + static final id = obx.QueryIntegerProperty( + _entities[5].properties[0], + ); + + /// See [StockPickingPartnerEntity.displayName]. + static final displayName = obx.QueryStringProperty( + _entities[5].properties[1], + ); +} + +/// [StockPickingRecordEntity] entity fields to define ObjectBox queries. +class StockPickingRecordEntity_ { + /// See [StockPickingRecordEntity.id]. + static final id = obx.QueryIntegerProperty( + _entities[6].properties[0], + ); + + /// See [StockPickingRecordEntity.priority]. + static final priority = obx.QueryStringProperty( + _entities[6].properties[1], + ); + + /// See [StockPickingRecordEntity.name]. + static final name = obx.QueryStringProperty( + _entities[6].properties[2], + ); + + /// See [StockPickingRecordEntity.pickingTypeCode]. + static final pickingTypeCode = + obx.QueryStringProperty( + _entities[6].properties[3], + ); + + /// See [StockPickingRecordEntity.state]. + static final state = obx.QueryStringProperty( + _entities[6].properties[4], + ); + + /// See [StockPickingRecordEntity.origin]. + static final origin = obx.QueryStringProperty( + _entities[6].properties[5], + ); + + /// See [StockPickingRecordEntity.useCreateLots]. + static final useCreateLots = + obx.QueryBooleanProperty( + _entities[6].properties[6], + ); + + /// See [StockPickingRecordEntity.isLocked]. + static final isLocked = obx.QueryBooleanProperty( + _entities[6].properties[7], + ); + + /// See [StockPickingRecordEntity.scheduledDate]. + static final scheduledDate = + obx.QueryStringProperty( + _entities[6].properties[8], + ); + + /// See [StockPickingRecordEntity.dateDeadline]. + static final dateDeadline = obx.QueryStringProperty( + _entities[6].properties[9], + ); + + /// See [StockPickingRecordEntity.dateDone]. + static final dateDone = obx.QueryStringProperty( + _entities[6].properties[10], + ); + + /// See [StockPickingRecordEntity.productsAvailability]. + static final productsAvailability = + obx.QueryStringProperty( + _entities[6].properties[11], + ); + + /// See [StockPickingRecordEntity.productsAvailabilityState]. + static final productsAvailabilityState = + obx.QueryStringProperty( + _entities[6].properties[12], + ); + + /// See [StockPickingRecordEntity.jsonPopover]. + static final jsonPopover = obx.QueryBooleanProperty( + _entities[6].properties[13], + ); + + /// See [StockPickingRecordEntity.activityExceptionIcon]. + static final activityExceptionIcon = + obx.QueryBooleanProperty( + _entities[6].properties[14], + ); + + /// See [StockPickingRecordEntity.activityExceptionDecoration]. + static final activityExceptionDecoration = + obx.QueryBooleanProperty( + _entities[6].properties[15], + ); + + /// See [StockPickingRecordEntity.showCheckAvailability]. + static final showCheckAvailability = + obx.QueryBooleanProperty( + _entities[6].properties[16], + ); + + /// See [StockPickingRecordEntity.hasScrapMove]. + static final hasScrapMove = + obx.QueryBooleanProperty( + _entities[6].properties[17], + ); + + /// See [StockPickingRecordEntity.hasPackages]. + static final hasPackages = obx.QueryBooleanProperty( + _entities[6].properties[18], + ); + + /// See [StockPickingRecordEntity.showNextPickings]. + static final showNextPickings = + obx.QueryBooleanProperty( + _entities[6].properties[19], + ); + + /// See [StockPickingRecordEntity.pickingTypeEntirePacks]. + static final pickingTypeEntirePacks = + obx.QueryBooleanProperty( + _entities[6].properties[20], + ); + + /// See [StockPickingRecordEntity.companyId]. + static final companyId = + obx.QueryRelationToOne< + StockPickingRecordEntity, + StockPickingCompanyEntity + >(_entities[6].properties[21]); + + /// See [StockPickingRecordEntity.partnerId]. + static final partnerId = + obx.QueryRelationToOne< + StockPickingRecordEntity, + StockPickingPartnerEntity + >(_entities[6].properties[22]); + + /// See [StockPickingRecordEntity.locationId]. + static final locationId = + obx.QueryRelationToOne< + StockPickingRecordEntity, + StockPickingLocationEntity + >(_entities[6].properties[23]); + + /// See [StockPickingRecordEntity.locationDestId]. + static final locationDestId = + obx.QueryRelationToOne< + StockPickingRecordEntity, + StockPickingLocationEntity + >(_entities[6].properties[24]); + + /// See [StockPickingRecordEntity.pickingTypeId]. + static final pickingTypeId = + obx.QueryRelationToOne( + _entities[6].properties[25], + ); + + /// 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( + _entities[7].properties[0], + ); + + /// See [StockPickingTypeEntity.displayName]. + static final displayName = obx.QueryStringProperty( + _entities[7].properties[1], + ); +}