mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
118 lines
2.5 KiB
TypeScript
118 lines
2.5 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Tandoor
|
|
* Tandoor API Docs
|
|
*
|
|
* The version of the OpenAPI document: 0.0.0
|
|
*
|
|
*
|
|
* 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';
|
|
import {
|
|
User,
|
|
UserFromJSON,
|
|
UserFromJSONTyped,
|
|
UserToJSON,
|
|
} from './';
|
|
|
|
/**
|
|
*
|
|
* @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 | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof CookLog
|
|
*/
|
|
rating?: number | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof CookLog
|
|
*/
|
|
comment?: string | null;
|
|
/**
|
|
*
|
|
* @type {User}
|
|
* @memberof CookLog
|
|
*/
|
|
readonly createdBy: User;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof CookLog
|
|
*/
|
|
createdAt?: Date;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof CookLog
|
|
*/
|
|
readonly updatedAt: Date;
|
|
}
|
|
|
|
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': json['id'],
|
|
'recipe': json['recipe'],
|
|
'servings': !exists(json, 'servings') ? undefined : json['servings'],
|
|
'rating': !exists(json, 'rating') ? undefined : json['rating'],
|
|
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
|
'createdBy': UserFromJSON(json['created_by']),
|
|
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
|
'updatedAt': (new Date(json['updated_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,
|
|
'comment': value.comment,
|
|
'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
|
|
};
|
|
}
|
|
|
|
|