mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-04 21:15:22 +02:00
feat: recipe timeline backend api (#1685)
* added recipe_timeline_events table to db * added schema and routes for recipe timeline events * added missing mixin and fixed update schema * added tests * adjusted migration revision tree * updated alembic revision test * added initial timeline event for new recipes * added additional tests * added event bus support * renamed event_dt to timestamp * add timeline_events to ignore list * run code-gen * use new test routes implementation * use doc string syntax * moved event type enum from db to schema Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
This commit is contained in:
parent
714a080ecb
commit
6ee64535df
19 changed files with 639 additions and 6 deletions
|
@ -21,6 +21,7 @@ from mealie.db.models.recipe.category import Category
|
|||
from mealie.db.models.recipe.comment import RecipeComment
|
||||
from mealie.db.models.recipe.ingredient import IngredientFoodModel, IngredientUnitModel
|
||||
from mealie.db.models.recipe.recipe import RecipeModel
|
||||
from mealie.db.models.recipe.recipe_timeline import RecipeTimelineEvent
|
||||
from mealie.db.models.recipe.shared import RecipeShareTokenModel
|
||||
from mealie.db.models.recipe.tag import Tag
|
||||
from mealie.db.models.recipe.tool import Tool
|
||||
|
@ -49,6 +50,7 @@ from mealie.schema.recipe import Recipe, RecipeCommentOut, RecipeToolOut
|
|||
from mealie.schema.recipe.recipe_category import CategoryOut, TagOut
|
||||
from mealie.schema.recipe.recipe_ingredient import IngredientFood, IngredientUnit
|
||||
from mealie.schema.recipe.recipe_share_token import RecipeShareToken
|
||||
from mealie.schema.recipe.recipe_timeline_events import RecipeTimelineEventOut
|
||||
from mealie.schema.reports.reports import ReportEntryOut, ReportOut
|
||||
from mealie.schema.server import ServerTask
|
||||
from mealie.schema.user import GroupInDB, LongLiveTokenInDB, PrivateUser
|
||||
|
@ -123,6 +125,10 @@ class AllRepositories:
|
|||
def recipe_share_tokens(self) -> RepositoryGeneric[RecipeShareToken, RecipeShareTokenModel]:
|
||||
return RepositoryGeneric(self.session, PK_ID, RecipeShareTokenModel, RecipeShareToken)
|
||||
|
||||
@cached_property
|
||||
def recipe_timeline_events(self) -> RepositoryGeneric[RecipeTimelineEventOut, RecipeTimelineEvent]:
|
||||
return RepositoryGeneric(self.session, PK_ID, RecipeTimelineEvent, RecipeTimelineEventOut)
|
||||
|
||||
# ================================================================
|
||||
# User
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue