Skip to content

Instantly share code, notes, and snippets.

@vadzappa
Last active April 9, 2020 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vadzappa/1834367b10e59c8cb91b937ab3a4a631 to your computer and use it in GitHub Desktop.
Save vadzappa/1834367b10e59c8cb91b937ab3a4a631 to your computer and use it in GitHub Desktop.
syntax = "proto3";
import "options.proto";
package protocol;
option go_package = ".;protocol";
message Title {
int64 id = 1 [(protocol.options).logField = "profession_id"];
string name = 2;
}
message User {
int64 id = 1 [(protocol.options).logField = "user_id"];
string name = 2;
string email = 3;
Title title = 4;
}
message Company {
int64 id = 1 [(protocol.options).logField = "company_id"];
User owner = 2 [(protocol.options).logField = "owner"];
User coOwner = 3 [(protocol.options).logField = "co_owner"];
int64 size = 4 [(protocol.options).logField = "size"];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment