Esempio n. 1
0
    class Person(models.Base):

        name = fields.StringField(
            validators=validators.Regex('^[a-z]+$', ignorecase=True))
    class ParkingPlace(models.Base):

        location = fields.StringField()
        car = fields.EmbeddedField(Car)
    class Lamborghini(models.Base):

        brand = fields.StringField()
Esempio n. 4
0
class EmbeddingModel(mf.ModelBase):
    field1 = fields.StringField()
    embedded = fields.EmbeddedField(ModelTest)
    class Person(models.Base):

        names = fields.ListField(str)
        surname = fields.StringField()
Esempio n. 6
0
class EmbeddedModel(mf.ModelBase):
    field = fields.StringField()
Esempio n. 7
0
class ModelTestWithIndexes(mf.ModelBase):
    field1 = fields.StringField()
    field2 = fields.StringField()
    field3 = fields.StringField()
Esempio n. 8
0
class PublishModelRequest(models.Base):
    model = fields.StringField(required=True)
    force_publish_task = fields.BoolField(default=False)
    publish_task = fields.BoolField(default=True)
Esempio n. 9
0
class ModelTaskPublishResponse(models.Base):
    id = fields.StringField(required=True)
    data = fields.EmbeddedField(TaskPublishResponse)
Esempio n. 10
0
class ReffedTestModel(mf.ModelBase):
    name = fields.StringField()
Esempio n. 11
0
class CreateModelResponse(models.Base):
    id = fields.StringField(required=True)
    created = fields.BoolField(required=True)
Esempio n. 12
0
 class User(models.Base):
     name = fields.StringField(nullable=True)
     props = fields.ListField([str, int, float], nullable=True)
     embedded = fields.EmbeddedField(Emb, nullable=True)
Esempio n. 13
0
 class Emb(models.Base):
     name = fields.StringField(nullable=True)
Esempio n. 14
0
    class Person(models.Base):

        name = fields.StringField(
            validators=validators.Regex('/^[a-z]+$/i', ignorecase=False))
Esempio n. 15
0
class Topic(mf.MixinBase):
    topic = fields.StringField(required=True)
Esempio n. 16
0
    class Person(models.Base):

        name = fields.StringField(required=True)
        surname = fields.StringField(required=True)
        age = fields.IntField()
        cash = fields.FloatField()
Esempio n. 17
0
class Name(mf.MixinBase):
    name = fields.StringField()
Esempio n. 18
0
 class Cat(models.Base):
     name = fields.StringField(required=True)
     breed = fields.StringField()
Esempio n. 19
0
class ModelTest(mf.ModelBase, mixins.BasicEvents):
    table_name = 'table1'

    field1 = fields.StringField()
    field2 = fields.StringField()
    field3 = fields.StringField()
Esempio n. 20
0
 class Dog(models.Base):
     name = fields.StringField(required=True)
     age = fields.IntField()
Esempio n. 21
0
class IndexesMixin(mf.MixinBase):
    foo = fields.StringField()
    bar = fields.StringField()
Esempio n. 22
0
 class Person(models.Base):
     name = fields.StringField(required=True)
     surname = fields.StringField(required=True)
     pets = fields.ListField(items_types=[Cat, Dog])
    class Parking(models.Base):

        location = fields.StringField()
        cars = fields.ListField([Viper, Lamborghini])
Esempio n. 24
0
    class Viper(models.Base):

        serial = fields.StringField()
    class Person(models.Base):

        name = fields.StringField()
        mix = fields.ListField((str, float))
Esempio n. 26
0
    class Lamborghini(models.Base):

        serial = fields.StringField()
    class Viper(models.Base):

        brand = fields.StringField()
Esempio n. 28
0
class ProjectReq(models.Base):
    project = fields.StringField()
    class Person(models.Base):

        name = fields.StringField()
        surname = fields.StringField()
        age = fields.IntField()
        cash = fields.FloatField()
Esempio n. 30
0
class LogicalRouterPort(mf.ModelBase, mixins.Topic, mixins.UniqueKey):
    mac = fields.StringField()
    lswitch = df_fields.ReferenceField(l2.LogicalSwitch)
    network = df_fields.IpNetworkField()