class WorkLog(me.Document): origin_id = me.StringField(required=True, unique=True) user_id = me.StringField(required=True) username = me.StringField(required=True) time = me.DateTimeField(required=True) text = me.StringField(required=True) deleted = me.BooleanField(default=False)
class EmbeddedArticle(motorengine.EmbeddedDocument): meta = {"collection": "test_embedded_article"} headline = motorengine.StringField(required=True) pub_date = motorengine.DateTimeField(default=datetime.now) editor = motorengine.ReferenceField(Editor) reporter = motorengine.ReferenceField("Reporter")
class Article(motorengine.Document): meta = {"collection": "test_article"} headline = motorengine.StringField(required=True, help_text="The article headline.") pub_date = motorengine.DateTimeField( default=datetime.now, verbose_name="publication date", help_text="The date of first press.", ) editor = motorengine.ReferenceField(Editor) reporter = motorengine.ReferenceField("Reporter")
class MotorDocument(motorengine.Document): __collection__ = "MotorBenchmarkQuery" field1 = motorengine.StringField() field2 = motorengine.IntField() field3 = motorengine.DateTimeField(default=datetime.now)
class HackerNewsStory(me.Document): id = me.StringField(unique=True) time = me.DateTimeField()
class MotorDocument(motorengine.Document): field1 = motorengine.StringField() field2 = motorengine.IntField() field3 = motorengine.DateTimeField(default=datetime.now)
class MotorDocument(motorengine.Document): __collection__ = "IntegrationTestDateTimeField" date = motorengine.DateTimeField()