9. モデル定義
namespace org.example
//モノ
asset Item identified by itemId {
o String itemId
--> User owner
o Double stock
o String name
o String code
o String status
}
//人
participant User identified by userId {
o String userId
o String firstname
o String lastname
}
9
//トランザクション
transaction ItemTransfer {
--> Item from
--> Item to
o String code
o Double amount
}
//トランザクション
transaction withDraw {
-->Item itemId
o Double amount
}
https://bitbucket.org/kolinzlabs/handson-material/src/master/zaikoshare/ から
model.ctoファイルをコピーすると簡単。