Created
February 20, 2019 21:35
-
-
Save vitiko/1db5b5836814cbf6c5feb13fcd6f348c to your computer and use it in GitHub Desktop.
Commercial paper state mapping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ( | |
// State mappings | |
StateMappings = m.StateMappings{}. | |
//key namespace will be <`CommercialPaper`, Issuer, PaperNumber> | |
Add(&schema.CommercialPaper{}, m.PKeySchema(&schema.CommercialPaperId{})) | |
// EventMappings | |
EventMappings = m.EventMappings{}. | |
// event name will be `IssueCommercialPaper`, payload - same as issue payload | |
Add(&schema.IssueCommercialPaper{}). | |
Add(&schema.BuyCommercialPaper{}). | |
Add(&schema.RedeemCommercialPaper{}) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
with imports it will more understandable what is the 'm'