Files
mealie/mealie/schema/category.py
Hayden 049c269f6f Feature/recipe viewer (#244)
* 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>
2021-03-31 19:01:10 -08:00

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