from datetime import datetime from typing import Optional, List from pydantic import BaseModel class FormFileInfo(BaseModel): md: str file_name: str mime_type: str user_id: str common_type: str file_url: str create_time: datetime class FormFileGet(BaseModel): md: str class FormFileCreate(BaseModel): md: str file_name: str mime_type: str user_id: str common_type: str file_url: str class FormFileQuery(BaseModel): md: Optional[str] = None file_name: Optional[str] = None mime_type: Optional[str] = None user_id: Optional[str] = None common_type: Optional[str] = None file_url: Optional[str] = None page: Optional[int] = None page_size: Optional[int] = None class FormFileQueryRes(BaseModel): item_list: List[FormFileInfo] count: int