28 lines
821 B
Python
28 lines
821 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
|
|
comment: Optional[str] = None
|
|
score: Optional[int] = None
|
|
class Config:
|
|
from_attributes = True
|