Skip to content

Instantly share code, notes, and snippets.

@ejiro
Created September 20, 2017 18:46
Show Gist options
  • Save ejiro/6d78cead8bc29cf176525c7687ecb456 to your computer and use it in GitHub Desktop.
Save ejiro/6d78cead8bc29cf176525c7687ecb456 to your computer and use it in GitHub Desktop.
/**
* Sample business network definition.
*/
namespace org.acme.sample
asset NewsClip identified by clipId {
o String clipId
--> User producer
o String titles
o String topic
o String tags
o String urls
o String length
o Boolean published
}
participant User identified by userId {
o String userId
o String firstName
o String lastName
o Double points
o Double reputation
}
transaction PublishedTransaction {
--> NewsClip newsClip
--> User producer
}
transaction WatchedTransaction {
--> NewsClip newsClip
--> User consumer
}
event WatchedEvent {
o String eventName
--> NewsClip newsClip
--> User producer
--> User consumer
}
event PublishedEvent {
o String eventName
--> NewsClip newsClip
--> User producer
}
event ErrorEvent {
o String eventName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment