feat: add outfit task models

This commit is contained in:
2026-06-18 17:30:18 +08:00
parent 5fb2f1c8e0
commit 382797cfea
2 changed files with 29 additions and 1 deletions
+28
View File
@@ -149,6 +149,34 @@ class VisibilityResult:
error: str = ""
# ---------------------------------------------------------------------------
# AI 穿搭
# ---------------------------------------------------------------------------
@dataclass
class OutfitTask:
"""AI 穿搭单行任务。
row_index: Excel 行号(从 1 开始,便于写回 D/E/F 列)。
status: 待处理 / 生成中 / 完成 / 失败 / 跳过。
"""
row_index: int
title: str
product_id: str
garment_path: str
status: str = "待处理"
@dataclass
class OutfitResult:
"""AI 穿搭单行生成结果。"""
task: OutfitTask
success: bool
output_path: str = ""
error: str = ""
attempts: int = 0
# ---------------------------------------------------------------------------
# 合成结果
# ---------------------------------------------------------------------------