Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

24 rindas
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(...)