from pydantic import BaseModel from typing import List, Union class ItemRecommend(BaseModel): pro_id: int product_name: str class ListItemRecommend(BaseModel): user_id: int total: int list_item: List[ItemRecommend]