Sample model file for Hyperledger?
#1
I'm writing out a model file but looking for some samples.... What types can I use beyond just "String"?
Reply
#2
Some samples:
Motel Five Network: https://github.com/ronaldlong46/motel-fi...ter/models
Car Sales Network: https://github.com/ronaldlong46/car-sales-network



For your second question, here is a list of types allowed to be used in your modelling (.cto) file. In this example I'll show a modelling file for motel reservations.

1. String
Code:
o String    roomId    // Example: A32

2. Double

Code:
o Double    roomPrice    // Example: 79.99

3. Integer

Code:
o Integer    numBeds    // Example: 2

4. Long

Code:
o Long    roomType    // Example: C1L4

5. DateTime

Code:
o DateTime    lastCleaned     // Example: 2018-04-26T00:55:23+00:00

6. Boolean

Code:
o Boolean    vacant    // Example: true
Reply