working on model select

This commit is contained in:
vabene1111
2024-03-11 19:46:37 +01:00
parent 09dc35228f
commit 18767c54ce
140 changed files with 7676 additions and 5949 deletions

View File

@@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
import { exists, mapValues } from '../runtime';
import { mapValues } from '../runtime';
/**
*
* @export
@@ -30,19 +30,27 @@ export interface RecipeShoppingUpdate {
* @type {number}
* @memberof RecipeShoppingUpdate
*/
listRecipe?: number | null;
listRecipe?: number;
/**
* List of ingredient IDs from the recipe to add, if not provided all ingredients will be added.
* @type {number}
* @memberof RecipeShoppingUpdate
*/
ingredients?: number | null;
ingredients?: number;
/**
* Providing a list_recipe ID and servings of 0 will delete that shopping list.
* @type {number}
* @memberof RecipeShoppingUpdate
*/
servings?: number | null;
servings?: number;
}
/**
* Check if a given object implements the RecipeShoppingUpdate interface.
*/
export function instanceOfRecipeShoppingUpdate(value: object): boolean {
if (!('id' in value)) return false;
return true;
}
export function RecipeShoppingUpdateFromJSON(json: any): RecipeShoppingUpdate {
@@ -50,31 +58,27 @@ export function RecipeShoppingUpdateFromJSON(json: any): RecipeShoppingUpdate {
}
export function RecipeShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeShoppingUpdate {
if ((json === undefined) || (json === null)) {
if (json == null) {
return json;
}
return {
'id': json['id'],
'listRecipe': !exists(json, 'list_recipe') ? undefined : json['list_recipe'],
'ingredients': !exists(json, 'ingredients') ? undefined : json['ingredients'],
'servings': !exists(json, 'servings') ? undefined : json['servings'],
'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'],
'ingredients': json['ingredients'] == null ? undefined : json['ingredients'],
'servings': json['servings'] == null ? undefined : json['servings'],
};
}
export function RecipeShoppingUpdateToJSON(value?: RecipeShoppingUpdate | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
if (value == null) {
return value;
}
return {
'list_recipe': value.listRecipe,
'ingredients': value.ingredients,
'servings': value.servings,
'list_recipe': value['listRecipe'],
'ingredients': value['ingredients'],
'servings': value['servings'],
};
}