api/app/schemas/tryon.py
2025-04-16 12:59:32 +08:00

24 lines
648 B
Python

from pydantic import BaseModel
from typing import Optional
from app.models.tryon import TryonStatus
from datetime import datetime
class TryonRequest(BaseModel):
top_clothing_url: Optional[str] = None
bottom_clothing_url: Optional[str] = None
class TryonHistoryModel(BaseModel):
id: int
person_image_url: Optional[str] = None
top_clothing_url: Optional[str] = None
bottom_clothing_url: Optional[str] = None
status: TryonStatus
task_id: Optional[str] = None
completion_url: Optional[str] = None
comment: Optional[str] = None
score: Optional[int] = None
class Config:
from_attributes = True