Skip to content

Commit 61a8e8f

Browse files
committed
feat(smartphone): add image_license/image_attribution fields for real image backfill
1 parent b9ffa40 commit 61a8e8f

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎app/models/smartphone.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class Smartphone(SQLModel, table=True):
5959
# Assets
6060
image_url: str | None = None
6161
images: list[str] = Field(default_factory=list, sa_column=Column(JSON))
62+
image_license: str | None = None
63+
image_attribution: str | None = None
6264

6365
# 3D — {url, version, bytes, sha256, license, attribution, parts[], colors[]}
6466
model_3d: dict[str, Any] | None = Field(default=None, sa_column=Column(JSON))

‎app/schemas/serializers.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ def smartphone_read(
266266
connectivity=phone.connectivity,
267267
image_url=phone.image_url,
268268
images=phone.images,
269+
image_license=phone.image_license,
270+
image_attribution=phone.image_attribution,
269271
model_3d=phone.model_3d,
270272
body=phone.body,
271273
score=phone_score_read(scores),

‎app/schemas/smartphone.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ class SmartphoneRead(BaseModel):
5252
connectivity: dict[str, Any]
5353
image_url: str | None = None
5454
images: list[str] = []
55+
image_license: str | None = None
56+
image_attribution: str | None = None
5557
model_3d: dict[str, Any] | None = None
5658
body: dict[str, Any] | None = None
5759
score: ScoreRead

0 commit comments

Comments
 (0)