From f631f3aa060fc857b11634a601dae950e22da37f Mon Sep 17 00:00:00 2001 From: Seungpyo1007 Date: Fri, 25 Sep 2026 06:07:21 +0900 Subject: [PATCH] feat(smartphone): add image_license/image_attribution fields for real image backfill --- app/models/smartphone.py | 2 ++ app/schemas/serializers.py | 2 ++ app/schemas/smartphone.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/app/models/smartphone.py b/app/models/smartphone.py index 5aea5c9..e97f0b4 100644 --- a/app/models/smartphone.py +++ b/app/models/smartphone.py @@ -59,6 +59,8 @@ class Smartphone(SQLModel, table=True): # Assets image_url: str | None = None images: list[str] = Field(default_factory=list, sa_column=Column(JSON)) + image_license: str | None = None + image_attribution: str | None = None # 3D — {url, version, bytes, sha256, license, attribution, parts[], colors[]} model_3d: dict[str, Any] | None = Field(default=None, sa_column=Column(JSON)) diff --git a/app/schemas/serializers.py b/app/schemas/serializers.py index b6555a6..65e59fd 100644 --- a/app/schemas/serializers.py +++ b/app/schemas/serializers.py @@ -266,6 +266,8 @@ def smartphone_read( connectivity=phone.connectivity, image_url=phone.image_url, images=phone.images, + image_license=phone.image_license, + image_attribution=phone.image_attribution, model_3d=phone.model_3d, body=phone.body, score=phone_score_read(scores), diff --git a/app/schemas/smartphone.py b/app/schemas/smartphone.py index 8e4a35c..b3df878 100644 --- a/app/schemas/smartphone.py +++ b/app/schemas/smartphone.py @@ -52,6 +52,8 @@ class SmartphoneRead(BaseModel): connectivity: dict[str, Any] image_url: str | None = None images: list[str] = [] + image_license: str | None = None + image_attribution: str | None = None model_3d: dict[str, Any] | None = None body: dict[str, Any] | None = None score: ScoreRead