diff --git a/schemas/foodimage.py b/schemas/foodimage.py new file mode 100644 index 0000000..6b76071 --- /dev/null +++ b/schemas/foodimage.py @@ -0,0 +1,28 @@ +from pydantic import BaseModel, Field +from typing import Optional + +class FoodImageBase(BaseModel): + image_url: str = Field(..., description="URL of the food image") + prompt: str = Field(..., description="Prompt used to generate the image") + status: str = Field(default="pending", description="Status of the image generation") + +class FoodImageCreate(FoodImageBase): + class Config: + schema_extra = { + "example": { + "image_url": "https://example.com/food-image.jpg", + "prompt": "A delicious plate of spaghetti carbonara", + "status": "pending" + } + } + +class FoodImage(FoodImageBase): + class Config: + orm_mode = True + schema_extra = { + "example": { + "image_url": "https://example.com/food-image.jpg", + "prompt": "A delicious plate of spaghetti carbonara", + "status": "completed" + } + } \ No newline at end of file