mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-03-04 04:33:12 -05:00
Sqlite (#75)
* file structure * auto-test * take 2 * refactor ap scheduler and startup process * fixed scraper error * database abstraction * database abstraction * port recipes over to new schema * meal migration * start settings migration * finale mongo port * backup improvements * migration imports to new DB structure * unused import cleanup * docs strings * settings and theme import logic * cleanup * fixed tinydb error * requirements * fuzzy search * remove scratch file * sqlalchemy models * improved search ui * recipe models almost done * sql modal population * del scratch * rewrite database model mixins * mostly grabage * recipe updates * working sqllite * remove old files and reorganize * final cleanup Co-authored-by: Hayden <hay-kot@pm.me>
This commit is contained in:
24
mealie/db/mongo/meal_models.py
Normal file
24
mealie/db/mongo/meal_models.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import uuid
|
||||
|
||||
import mongoengine
|
||||
|
||||
|
||||
class MealDocument(mongoengine.EmbeddedDocument):
|
||||
slug = mongoengine.StringField()
|
||||
name = mongoengine.StringField()
|
||||
date = mongoengine.DateField()
|
||||
dateText = mongoengine.StringField()
|
||||
image = mongoengine.StringField()
|
||||
description = mongoengine.StringField()
|
||||
|
||||
|
||||
class MealPlanDocument(mongoengine.Document):
|
||||
uid = mongoengine.UUIDField(default=uuid.uuid1)
|
||||
startDate = mongoengine.DateField(required=True)
|
||||
endDate = mongoengine.DateField(required=True)
|
||||
meals = mongoengine.ListField(required=True)
|
||||
|
||||
meta = {
|
||||
"db_alias": "core",
|
||||
"collection": "meals",
|
||||
}
|
||||
Reference in New Issue
Block a user