feat: Adds ObjectBox entities for stock picking
Introduces a comprehensive set of ObjectBox entities to support local storage and management of stock picking data. This includes: * `StockPickingRecordEntity`: The primary entity for stock picking records, encompassing various attributes and relations. * Related entities: `StockPickingCompanyEntity`, `StockPickingPartnerEntity`, `StockPickingLocationEntity`, and `StockPickingTypeEntity` for associated data. * Move entities: `MoveLineWithoutPackageEntity` and `MoveWithoutPackageEntity` for detailed product movements within a picking record, including relations to product data. These entities enable efficient local data persistence and querying for stock picking operations.
This commit is contained in:
parent
3f9f840a1c
commit
e22a49f9bc
@ -1 +1,123 @@
|
||||
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<StockPickingCompanyEntity> companyId = ToOne();
|
||||
final ToOne<StockPickingPartnerEntity> partnerId = ToOne();
|
||||
final ToOne<StockPickingLocationEntity> locationId = ToOne();
|
||||
final ToOne<StockPickingLocationEntity> locationDestId = ToOne();
|
||||
final ToOne<StockPickingTypeEntity> pickingTypeId = ToOne();
|
||||
|
||||
@Backlink('pickingRecord')
|
||||
final ToMany<MoveLineWithoutPackageEntity> moveLineIdsWithoutPackage =
|
||||
ToMany();
|
||||
|
||||
@Backlink('pickingRecord')
|
||||
final ToMany<MoveWithoutPackageEntity> 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<ProductEntity> productId = ToOne();
|
||||
final ToOne<StockPickingRecordEntity> 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<ProductEntity> productId = ToOne();
|
||||
final ToOne<StockPickingRecordEntity> pickingRecord = ToOne();
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
],
|
||||
"lastEntityId": "1:6757833172062715556",
|
||||
"lastIndexId": "0:0",
|
||||
"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": "8:1447656502749776913",
|
||||
"lastIndexId": "9:5054232387620309172",
|
||||
"lastRelationId": "0:0",
|
||||
"lastSequenceId": "0:0",
|
||||
"modelVersion": 5,
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user