Ejemplo n.º 1
0
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
Ejemplo n.º 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)
Ejemplo n.º 3
0
class FooModel(model.RootObjectModel):
    field = model.Object(BarModel, thrift_id=1)
Ejemplo n.º 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)
Ejemplo n.º 5
0
 class C(model.RootObjectModel):
     b = model.Object(B, thrift_id=1)