participant执行transactions,transaction提交events,events展示到订阅者的app上面。
transactions
有默认的transaction id,因此不需要identified by
transaction id
timestamp
另一默认的属性为为Timestamp
events
有默认的属性
eventId
timestamp
js当中的annotations are used to connect the code to the model.
在js当中需要使用composer API
例:
@param{org.acme.airline.flight.CreateFlight}flightData
@transaction
大括号内的是transaction的名字,最右侧可以把它看做一个结构体。
声明和它有关的函数时,应该:
function createFlight(flightData){}
参数的名字和这个有点像结构体一样的对应起来。
交易逻辑写在了js里面!!!!!
historian
historian是asset的注册表。记录了所有成功执行的交易。
它可以被查询到。
它记录系统的交易,也记录用户定义的资产的交易。
有注册表就有查询。
查询语句见下个笔记。