From 45ae44197060bdd885356847f82d7b96e8a8582e Mon Sep 17 00:00:00 2001 From: Alix JEUDI--LEMOINE Date: Thu, 15 May 2025 09:41:41 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Added=20image=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/image.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 app/models/image.py diff --git a/app/models/image.py b/app/models/image.py new file mode 100644 index 0000000..f37db0d --- /dev/null +++ b/app/models/image.py @@ -0,0 +1,15 @@ +from typing import Optional +from datetime import datetime +from pydantic import BaseModel, Field + +class Image(BaseModel): + id: Optional[str] = Field(None, alias="_id") + pin_id: Optional[str] = None + image_hash: str + metadata: dict = { + "created_at": datetime.now().isoformat(), + "original_filename": "", + "mime_type": "", + "size": 0 + } + caption: Optional[str] = None \ No newline at end of file