Fix up how enums work. Now they're always strings

This commit is contained in:
Jason Paryani
2013-07-06 23:10:51 -07:00
parent cd4708b1a0
commit b2aa5e8019
4 changed files with 253 additions and 59 deletions

View File

@@ -0,0 +1,32 @@
@0x934efea7f017fff0;
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 @4 union {
unemployed @5 :Void;
employer @6 :Text;
school @7 :Text;
selfEmployed @8 :Void;
# We assume that a person is only one of these.
}
}
struct AddressBook {
people @0 :List(Person);
}