Created
April 10, 2019 07:31
-
-
Save ErFUN-KH/34b750e736cfcc330f391c760d8fdeb7 to your computer and use it in GitHub Desktop.
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"; | |
message Date { | |
// Year of date. Must be from 1 to 9999, or 0 if specifying a date without | |
// a year. | |
int32 year = 1; | |
// Month of year. Must be from 1 to 12. | |
int32 month = 2; | |
// Day of month. Must be from 1 to 31 and valid for the year and month, or 0 | |
// if specifying a year/month where the day is not significant. | |
int32 day = 3; | |
} |
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
// The syntax for this file is proto3 | |
syntax = "proto3"; | |
import "my-root-project-directory/date.proto"; | |
/* Person is used to identify users | |
* across our system */ | |
message Person { | |
// the age as of the person's creation | |
int32 age = 1; | |
// the first name as documented in the signup form | |
string first_name = 2; | |
string last_name = 3; // last name as documented in the signup form | |
// small_picture represents a small .jpg file | |
bytes small_picture = 4; | |
bool is_profile_verified = 5; | |
// height of the person in cms | |
float height = 6; | |
// a list of phone numbers that is optional to provide at signup | |
repeated string phone_numbers = 7; | |
// we currently consider only 4 eye colours | |
enum EyeColour { | |
UNKNOWN_EYE_COLOUR = 0; | |
EYE_GREEN = 1; | |
EYE_BROWN = 2; | |
EYE_BLUE = 3; | |
EYE_GRAY = 4; | |
} | |
// it's an enum as defined above | |
EyeColour eye_colour = 8; | |
// Person's birthday | |
Date birthday = 9; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment