api/app/schemas/tryon.py
2025-04-11 21:36:49 +08:00

26 lines
755 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_id: Optional[int] = None
bottom_clothing_id: Optional[int] = None
top_clothing_url: Optional[str] = None
bottom_clothing_url: Optional[str] = None
class TryonHistoryModel(BaseModel):
id: int
person_image_id: Optional[int] = None
top_clothing_id: Optional[int] = None
bottom_clothing_id: Optional[int] = 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
class Config:
from_attributes = True