Food Models
food
Classes:
-
Food–Represents a food item (summary view).
-
FoodDetail–Represents detailed information about a food item.
-
FoodEffect–Represents the effect of a food item.
-
FoodRecipe–Represents the recipe details for a food item.
-
FoodSource–Represents a source where food can be obtained.
Food
pydantic-model
Represents a food item (summary view).
Attributes:
-
id(int) –The unique identifier for the food.
-
name(str) –The name of the food.
-
type(str) –The type or category of the food.
-
recipe(bool) –Indicates if the food is obtained via a recipe.
-
icon(str) –The URL of the food's icon.
-
rarity(int) –The rarity or rank of the food.
-
route(str) –The internal route or identifier for the food.
-
effect_icon(str | None) –The URL of the icon representing the food's effect category, if applicable.
Fields:
-
id(int) -
name(str) -
type(str) -
recipe(bool) -
icon(str) -
rarity(int) -
route(str) -
effect_icon(str | None)
Validators:
-
_convert_recipe→recipe -
_convert_icon_url→icon -
_convert_effect_icon_url→effect_icon
FoodDetail
pydantic-model
Represents detailed information about a food item.
Attributes:
-
name(str) –The name of the food.
-
description(str) –The description of the food.
-
type(str) –The type or category of the food.
-
recipe(FoodRecipe | bool) –Details about the recipe if the food can be cooked, otherwise False.
-
sources(list[FoodSource]) –A list of sources where the food can be obtained.
-
icon(str) –The URL of the food's icon.
-
rarity(int) –The rarity or rank of the food.
-
route(str) –The internal route or identifier for the food.
Fields:
-
name(str) -
description(str) -
type(str) -
recipe(FoodRecipe | bool) -
sources(list[FoodSource]) -
icon(str) -
rarity(int) -
route(str)
Validators:
FoodEffect
pydantic-model
Represents the effect of a food item.
Attributes:
-
id(str) –The identifier for the effect.
-
description(str) –The description of the effect.
Fields:
-
id(str) -
description(str)
FoodRecipe
pydantic-model
Represents the recipe details for a food item.
Attributes:
-
effect_icon(str) –The URL of the icon representing the food's effect category.
-
effects(list[FoodEffect]) –A list of specific effects provided by the food.
Fields:
-
effect_icon(str) -
effects(list[FoodEffect])
Validators:
-
_convert_effect_icon_url→effect_icon -
_convert_effects→effects