mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-01-28 19:43:11 -05:00
chore: refactor base schema (#1098)
* remove dead backup code * implmenet own base model * refactor to use MealieModel instead of CamelModel * cleanup deps
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from fastapi_camelcase import CamelModel
|
||||
from mealie.schema._mealie import MealieModel
|
||||
|
||||
|
||||
class AppStatistics(CamelModel):
|
||||
class AppStatistics(MealieModel):
|
||||
total_recipes: int
|
||||
total_users: int
|
||||
total_groups: int
|
||||
@@ -9,7 +9,7 @@ class AppStatistics(CamelModel):
|
||||
untagged_recipes: int
|
||||
|
||||
|
||||
class AppInfo(CamelModel):
|
||||
class AppInfo(MealieModel):
|
||||
production: bool
|
||||
version: str
|
||||
demo_status: bool
|
||||
@@ -26,7 +26,7 @@ class AdminAboutInfo(AppInfo):
|
||||
build_id: str
|
||||
|
||||
|
||||
class CheckAppConfig(CamelModel):
|
||||
class CheckAppConfig(MealieModel):
|
||||
email_ready: bool = False
|
||||
ldap_ready: bool = False
|
||||
base_url_set: bool = False
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from fastapi_camelcase import CamelModel
|
||||
from mealie.schema._mealie import MealieModel
|
||||
|
||||
|
||||
class MaintenanceSummary(CamelModel):
|
||||
class MaintenanceSummary(MealieModel):
|
||||
data_dir_size: str
|
||||
log_file_size: str
|
||||
cleanable_images: int
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
from typing import Optional
|
||||
|
||||
from fastapi_camelcase import CamelModel
|
||||
from pydantic import validator
|
||||
from slugify import slugify
|
||||
|
||||
from mealie.schema._mealie import MealieModel
|
||||
|
||||
from ..recipe.recipe_category import RecipeCategoryResponse
|
||||
|
||||
|
||||
class CustomPageBase(CamelModel):
|
||||
class CustomPageBase(MealieModel):
|
||||
name: str
|
||||
slug: Optional[str]
|
||||
position: int
|
||||
|
||||
Reference in New Issue
Block a user