mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 23:01:44 +01:00
31 lines
490 B
Cap'n Proto
31 lines
490 B
Cap'n Proto
@0xebf92c49b1687ddb;
|
|
|
|
struct Person {
|
|
id @0 :UInt32;
|
|
name @1 :Text;
|
|
email @2 :Text;
|
|
phones @3 :List(PhoneNumber);
|
|
|
|
struct PhoneNumber {
|
|
number @0 :Text;
|
|
type @1 :Type;
|
|
|
|
enum Type {
|
|
mobile @0;
|
|
home @1;
|
|
work @2;
|
|
}
|
|
}
|
|
|
|
employment :union {
|
|
unemployed @4 :Void;
|
|
employer @5 :Text;
|
|
school @6 :Text;
|
|
selfEmployed @7 :Void;
|
|
# We assume that a person is only one of these.
|
|
}
|
|
}
|
|
|
|
struct AddressBook {
|
|
people @0 :List(Person);
|
|
} |