mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
more basics
This commit is contained in:
104
vue3/src/openapi/models/CookLog.ts
Normal file
104
vue3/src/openapi/models/CookLog.ts
Normal file
@@ -0,0 +1,104 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Django Recipes
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document:
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface CookLog
|
||||
*/
|
||||
export interface CookLog {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
recipe: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
servings?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
rating?: number | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
readonly createdBy?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
createdAt?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CookLog interface.
|
||||
*/
|
||||
export function instanceOfCookLog(value: object): boolean {
|
||||
let isInstance = true;
|
||||
isInstance = isInstance && "recipe" in value;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function CookLogFromJSON(json: any): CookLog {
|
||||
return CookLogFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLog {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'recipe': json['recipe'],
|
||||
'servings': !exists(json, 'servings') ? undefined : json['servings'],
|
||||
'rating': !exists(json, 'rating') ? undefined : json['rating'],
|
||||
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
||||
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function CookLogToJSON(value?: CookLog | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': value.recipe,
|
||||
'servings': value.servings,
|
||||
'rating': value.rating,
|
||||
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user