This commit is contained in:
2026-01-27 17:40:37 +01:00
parent 82947a7bd6
commit adc2cd572a
55 changed files with 4145 additions and 101 deletions

View File

@@ -0,0 +1,27 @@
from typing import Optional, Dict, Any
from uuid import UUID
from datetime import datetime
from app.models.ingredient import AssetType
from pydantic import BaseModel, ConfigDict, Field
class IngredientBase(BaseModel):
name: str
type: AssetType
metadata: Optional[Dict[str, Any]] = Field(default={}, validation_alias="metadata_")
class IngredientCreate(IngredientBase):
project_id: UUID
class Ingredient(IngredientBase):
id: UUID
project_id: UUID
s3_key: str
s3_bucket: str
thumbnail_key: Optional[str] = None
created_at: datetime
# Computed fields or properties can be added here
presigned_url: Optional[str] = None
model_config = ConfigDict(from_attributes=True)