After defining the common structures of the blockchain network, let's define the assets that will be used in it. In our solution, we will have the FoodBox and FoodBoxPallet assets.
The following code defines them:
// Definition of a food box
asset FoodBox identified by foodBoxIdentifier {
o String foodBoxIdentifier
o Location[] assetTrackingInformation
o Measurement[] measureTrackingInformation
--> FoodSafetyParticipant owner
}
// Definition of a pallet that groups food boxes
asset FoodBoxPallet identified by foodBoxPalletIdentifier {
o String foodBoxPalletIdentifier
--> FoodBox foodBoxInPallet
o Location[] assetTrackingInformation
o Measurement[] measureTrackingInformation
--> FoodSafetyParticipant owner
}