Created
February 20, 2019 21:26
-
-
Save vitiko/807884b1670bdb5ac2a85ac735bfbd44 to your computer and use it in GitHub Desktop.
Commercial paper proto definition
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
syntax = "proto3"; | |
package schema; | |
import "google/protobuf/timestamp.proto"; | |
message CommercialPaper { | |
enum State { | |
ISSUED = 0; | |
TRADING = 1; | |
REDEEMED = 2; | |
} | |
string issuer = 1; | |
string paper_number = 2; | |
string owner = 3; | |
google.protobuf.Timestamp issue_date = 4; | |
google.protobuf.Timestamp maturity_date = 5; | |
int32 face_value = 6; | |
State state = 7; | |
} | |
// CommercialPaperId identifier part | |
message CommercialPaperId { | |
string issuer = 1; | |
string paper_number = 2; | |
} | |
// IssueCommercialPaper event | |
message IssueCommercialPaper { | |
string issuer = 1; | |
string paper_number = 2; | |
google.protobuf.Timestamp issue_date = 3; | |
google.protobuf.Timestamp maturity_date = 4; | |
int32 face_value = 5; | |
} | |
// BuyCommercialPaper event | |
message BuyCommercialPaper { | |
string issuer = 1; | |
string paper_number = 2; | |
string current_owner = 3; | |
string new_owner = 4; | |
int32 price = 5; | |
google.protobuf.Timestamp purchase_date = 6; | |
} | |
// RedeemCommercialPaper event | |
message RedeemCommercialPaper { | |
string issuer = 1; | |
string paper_number = 2; | |
string redeeming_owner = 3; | |
google.protobuf.Timestamp redeem_date = 4; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment