Last active
April 10, 2019 07:11
-
-
Save ErFUN-KH/ec9a0c1685ffafe00a5093b7b7235f9c 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
// The syntax for this file is proto3 | |
syntax = "proto3"; | |
/* 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; | |
} | |
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment