meals-made-easy-app/src/app/shared/models/RecipeDraftView.model.ts
2026-01-28 15:41:10 -06:00

32 lines
803 B
TypeScript

import { ResourceOwner } from './ResourceOwner.model';
import { ImageView } from './ImageView.model';
export interface RecipeDraftViewModel {
id: string;
created: Date;
modified?: Date | null;
state: 'INFER' | 'ENTER_DATA';
slug?: string | null;
title?: string | null;
preparationTime?: number | null;
cookingTime?: number | null;
totalTime?: number | null;
rawText?: string | null;
ingredients?: IngredientDraft[] | null;
owner: ResourceOwner;
mainImage?: ImageView | null;
lastInference?: RecipeDraftInferenceView | null;
}
export interface IngredientDraft {
amount?: string | null;
name: string;
notes?: string | null;
}
export interface RecipeDraftInferenceView {
inferredAt: Date;
title: string;
rawText: string;
}