class Parent(model.RootObjectModel):
    s = model.String(thrift_id=1)
    b = model.Object(Sub, thrift_id=2)

    def __eq__(self, other):
        return self.s == other.s and self.b == other.b
Beispiel #2
0
class Company(model.RootObjectModel):
    name = model.String(thrift_id=1)
    url = model.String(thrift_id=2)
    employees = model.List(model.Object(Employee), thrift_id=3)
class FooModel(model.RootObjectModel):
    field = model.Object(BarModel, thrift_id=1)
Beispiel #4
0
class Employee(model.Model):
    first_name = model.String(thrift_id=1)
    last_name = model.String(thrift_id=2)
    email_addresses = model.List(model.String(), thrift_id=3)
    address = model.Object(Address, thrift_id=4)
Beispiel #5
0
 class C(model.RootObjectModel):
     b = model.Object(B, thrift_id=1)