create the chaincode in java with given data structure fields for api calls. and build with gradle.
[login to view URL]
Or fabric sample chaincodes like fabcar, marbles for ref.
For experienced java code it takes a couple of hours to do.