mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-20 02:42:20 -05:00
* fix dialog placement * markdown support in ingredients * fix line render issue * fix tag rendering bug * change ingredients to text area * no slug error * add tag pages * remove console.logs Co-authored-by: hay-kot <hay-kot@pm.me>
32 lines
547 B
Python
32 lines
547 B
Python
from typing import List, Optional
|
|
|
|
from fastapi_camelcase import CamelModel
|
|
from mealie.schema.recipe import Recipe
|
|
|
|
|
|
class CategoryIn(CamelModel):
|
|
name: str
|
|
|
|
|
|
class CategoryBase(CategoryIn):
|
|
id: int
|
|
slug: str
|
|
|
|
class Config:
|
|
orm_mode = True
|
|
|
|
|
|
class RecipeCategoryResponse(CategoryBase):
|
|
recipes: Optional[List[Recipe]]
|
|
|
|
class Config:
|
|
schema_extra = {"example": {"id": 1, "name": "dinner", "recipes": [{}]}}
|
|
|
|
|
|
class TagBase(CategoryBase):
|
|
pass
|
|
|
|
|
|
class RecipeTagResponse(RecipeCategoryResponse):
|
|
pass
|