|
Maxious
|
1 |
import "php.proto"; |
|
|
2 |
|
|
|
3 |
package tests; |
|
|
4 |
|
|
|
5 |
//option (php.namespace) = "Example"; |
|
|
6 |
//option (php.multifile) = true; |
|
|
7 |
|
|
|
8 |
/** |
|
|
9 |
* Defines a Person in the addressbook |
|
|
10 |
*/ |
|
|
11 |
message Person { |
|
|
12 |
/* The full name of the person */ |
|
|
13 |
required string name = 1; |
|
|
14 |
/* The person Id in the database */ |
|
|
15 |
required int32 id = 2; |
|
|
16 |
/* The person email */ |
|
|
17 |
optional string email = 3; |
|
|
18 |
|
|
|
19 |
/* Different types of phones */ |
|
|
20 |
enum PhoneType { |
|
|
21 |
MOBILE = 0; |
|
|
22 |
HOME = 1; |
|
|
23 |
WORK = 2; |
|
|
24 |
} |
|
|
25 |
|
|
|
26 |
/* |
|
|
27 |
A phone number record |
|
|
28 |
*/ |
|
|
29 |
message PhoneNumber { |
|
|
30 |
required string number = 1; |
|
|
31 |
optional PhoneType type = 2 [default = HOME]; |
|
|
32 |
} |
|
|
33 |
|
|
|
34 |
/* The different phone numbers associated to a person */ |
|
|
35 |
repeated PhoneNumber phone = 4; |
|
|
36 |
} |
|
|
37 |
|
|
|
38 |
/* A collection of persons contact details */ |
|
|
39 |
message AddressBook { |
|
|
40 |
repeated Person person = 1; |
|
|
41 |
|
|
|
42 |
extensions 1000 to max; |
|
|
43 |
} |
|
|
44 |
|