Пример #1
0
    class Person(models.Base):

        name = fields.StringField(
            validators=validators.Regex('^[a-z]+$', ignorecase=True))
Пример #2
0
    class ParkingPlace(models.Base):

        location = fields.StringField()
        car = fields.EmbeddedField(Car)
Пример #3
0
    class Lamborghini(models.Base):

        brand = fields.StringField()
Пример #4
0
class EmbeddingModel(mf.ModelBase):
    field1 = fields.StringField()
    embedded = fields.EmbeddedField(ModelTest)
Пример #5
0
    class Person(models.Base):

        names = fields.ListField(str)
        surname = fields.StringField()
Пример #6
0
class EmbeddedModel(mf.ModelBase):
    field = fields.StringField()
Пример #7
0
class ModelTestWithIndexes(mf.ModelBase):
    field1 = fields.StringField()
    field2 = fields.StringField()
    field3 = fields.StringField()
Пример #8
0
class PublishModelRequest(models.Base):
    model = fields.StringField(required=True)
    force_publish_task = fields.BoolField(default=False)
    publish_task = fields.BoolField(default=True)
Пример #9
0
class ModelTaskPublishResponse(models.Base):
    id = fields.StringField(required=True)
    data = fields.EmbeddedField(TaskPublishResponse)
Пример #10
0
class ReffedTestModel(mf.ModelBase):
    name = fields.StringField()
Пример #11
0
class CreateModelResponse(models.Base):
    id = fields.StringField(required=True)
    created = fields.BoolField(required=True)
Пример #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)
Пример #13
0
 class Emb(models.Base):
     name = fields.StringField(nullable=True)
Пример #14
0
    class Person(models.Base):

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

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

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

        location = fields.StringField()
        cars = fields.ListField([Viper, Lamborghini])
Пример #24
0
    class Viper(models.Base):

        serial = fields.StringField()
Пример #25
0
    class Person(models.Base):

        name = fields.StringField()
        mix = fields.ListField((str, float))
Пример #26
0
    class Lamborghini(models.Base):

        serial = fields.StringField()
Пример #27
0
    class Viper(models.Base):

        brand = fields.StringField()
Пример #28
0
class ProjectReq(models.Base):
    project = fields.StringField()
Пример #29
0
    class Person(models.Base):

        name = fields.StringField()
        surname = fields.StringField()
        age = fields.IntField()
        cash = fields.FloatField()
Пример #30
0
class LogicalRouterPort(mf.ModelBase, mixins.Topic, mixins.UniqueKey):
    mac = fields.StringField()
    lswitch = df_fields.ReferenceField(l2.LogicalSwitch)
    network = df_fields.IpNetworkField()