Вы можете создать Массив события в файле модели.Он будет работать как единственное поле Array.
Пример:
namespace org.example.basic
asset SampleAsset identified by assetId {
o String assetId
--> SampleParticipant owner
o String value
o SampleEvent[] sampleEvent
}
Созданный актив содержит:
{
"$class": "org.hyperledger.composer.system.AddAsset",
"resources": [
{
"$class": "org.example.basic.SampleAsset",
"assetId": "4467",
"owner": "resource:org.example.basic.SampleParticipant#7145",
"value": "Esse laboris quis consectetur.",
"sampleEvent": [
{
"$class": "org.example.basic.SampleEvent",
"asset": "resource:org.example.basic.SampleAsset#5945",
"oldValue": "Proident aliqua id ex.",
"newValue": "Esse ex aliqua exercitation sit.",
"eventId": "6719",
"timestamp": "2019-09-26T05:08:12.554Z"
}
]
}
],
"targetRegistry": "resource:org.hyperledger.composer.system.AssetRegistry#org.example.basic.SampleAsset",
"transactionId": "7ecd4664-c0d2-4b56-871e-6ff1ae9c4b56",
"timestamp": "2019-09-26T05:08:20.448Z"
}