您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

24 行
530 B

  1. from fastapi import Form, UploadFile
  2. from pydantic import BaseModel, Field
  3. from dataclasses import dataclass
  4. class CreateCarPart(BaseModel):
  5. ParentId: int = Form(...)
  6. Name: str = Form(...)
  7. Number: str = Form(...)
  8. Condition: str = Form(...)
  9. Cost: int = Form(...)
  10. image: UploadFile = Form(...)
  11. class ShowCarPart(BaseModel):
  12. ParentId: int = Field(...)
  13. Name: str = Field(...)
  14. Number: str = Field(...)
  15. Condition: str = Field(...)
  16. Cost: int = Field(...)
  17. image: str = Field(...)