更新swag

This commit is contained in:
2025-11-26 20:51:22 +08:00
parent 6387a5798b
commit 17ae47fa68
2 changed files with 88 additions and 8 deletions

View File

@@ -317,6 +317,13 @@ import {PaginationDTO, Response} from '../enums';
* @property {Array<RecipeIngredientDto>} [recipe_ingredients] - 配方原料组成
*/
/**
* @typedef {object} GenerateRecipeResponse
* @property {number} id - 新生成的配方ID
* @property {string} name - 新生成的配方名称
* @property {string} description - 新生成的配方描述
*/
// --- API Functions ---
@@ -628,6 +635,15 @@ export const deleteRecipe = (id) => {
return http.delete(`/api/v1/feed/recipes/${id}`);
};
/**
* 使用系统中所有可用的原料一键生成配方
* @param {number} pigTypeId - 猪类型ID
* @returns {Promise<Response<GenerateRecipeResponse>>}
*/
export const generateRecipeFromAllMaterials = (pigTypeId) => {
return http.post(`/api/v1/feed/recipes/generate-from-all-materials/${pigTypeId}`);
};
export const FeedApi = {
getNutrients,
@@ -662,4 +678,5 @@ export const FeedApi = {
getRecipeById,
updateRecipe,
deleteRecipe,
generateRecipeFromAllMaterials,
};