1 2 3 4 5 6 7 8 9 10 11 12 13 14 | /** * An abstract participant type in this business network */ abstract participant Business identified by email { o String email o Address address o Double accountBalance } /** * A Grower is a type of participant in the network */ participant Grower extends Business { } |
1 2 3 4 5 | /** * A Shipper is a type of participant in the network */ participant Shipper extends Business { } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | /** * Defines a contract between a Grower and an Importer to ship using * a Shipper, paying a set unit price.The unit price is multiplied by * a penality factor proportional to the deviation from the min and max * negociated temperatures for the shipment. */ asset Contract identified by contractId { o String contractId --> Grower grower --> Shipper shipper --> Importer importer o DateTime arrivalDateTime o Double unitPrice o Double minTemperature o Double maxTemperature o Double minPenaltyFactor o Double maxPenaltyFactor } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |