mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-04 21:58:54 -05:00
regenerate fetch API
This commit is contained in:
124
vue3/models/CookLog.ts
Normal file
124
vue3/models/CookLog.ts
Normal file
@@ -0,0 +1,124 @@
|
||||
/* 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 { mapValues } from '../runtime';
|
||||
import type { User } from './User';
|
||||
import {
|
||||
UserFromJSON,
|
||||
UserFromJSONTyped,
|
||||
UserToJSON,
|
||||
} from './User';
|
||||
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
comment?: string;
|
||||
/**
|
||||
*
|
||||
* @type {User}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
readonly createdBy: User;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
createdAt?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof CookLog
|
||||
*/
|
||||
readonly updatedAt: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the CookLog interface.
|
||||
*/
|
||||
export function instanceOfCookLog(value: object): boolean {
|
||||
if (!('id' in value)) return false;
|
||||
if (!('recipe' in value)) return false;
|
||||
if (!('createdBy' in value)) return false;
|
||||
if (!('updatedAt' in value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
export function CookLogFromJSON(json: any): CookLog {
|
||||
return CookLogFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): CookLog {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'],
|
||||
'recipe': json['recipe'],
|
||||
'servings': json['servings'] == null ? undefined : json['servings'],
|
||||
'rating': json['rating'] == null ? undefined : json['rating'],
|
||||
'comment': json['comment'] == null ? undefined : json['comment'],
|
||||
'createdBy': UserFromJSON(json['created_by']),
|
||||
'createdAt': json['created_at'] == null ? undefined : (new Date(json['created_at'])),
|
||||
'updatedAt': (new Date(json['updated_at'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function CookLogToJSON(value?: Omit<CookLog, 'id'|'created_by'|'updated_at'> | null): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
return {
|
||||
|
||||
'recipe': value['recipe'],
|
||||
'servings': value['servings'],
|
||||
'rating': value['rating'],
|
||||
'comment': value['comment'],
|
||||
'created_at': value['createdAt'] == null ? undefined : ((value['createdAt']).toISOString()),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user