class TD2(BaseDoc): required_field2 = StringField(required=True) default_field2 = StringField(default='df2') choices_field2 = StringField(choices=ContactStatus) simple_field2 = StringField()
class TD3(TD1, TD2): required_field3 = StringField(required=True) default_field3 = StringField(default='df3') choices_field3 = StringField(choices=ContactStatus) simple_field3 = StringField()
class TD(BaseDoc): field1 = StringField(required=True)
class ITD(BaseDoc): int_field = IntField() string_field = StringField()
class _TestModel(BaseDoc): field1 = StringField(required=True) field2 = DateTimeField(default=datetime.now)
class TD(BaseDoc): field1 = StringField(validators=[EmailValidator()])
class TD1(BaseDoc): field1 = StringField()
class TD(BaseDoc): field1 = ListField(StringField())
class TD(BaseDoc): field1 = StringField() field2 = DictField(DocumentField(InDictTD))
class TD(BaseDoc): field1 = StringField() field2 = IntField() field3 = DocumentField(ITD)
class TD(BaseDoc): field1 = StringField() field2 = ListField(DocumentField(ITD))
class ITD(BaseDoc): field1 = StringField(default='ts')
class ITD(BaseDoc): field1 = StringField(default='test_string') field2 = StringField()
class TD(BaseDoc): field1 = StringField(required=True, default='test_string') field2 = BooleanField(required=True, default=False) field3 = StringField(default='test_string')
class Foo(BaseDoc): bar = StringField()
class TD(BaseDoc): field1 = StringField(required=True, default='test_string') field2 = DateTimeField(default=datetime.now) field3 = UUIDField(default=uuid.uuid4) field4 = ObjectIdField(default=ObjectId)
class FooDoc(DocWithLifeCycle): objects = Collection(db_name='main', collection_name='testmodel') bar = StringField()