You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 regels
528 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: float = 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: float = Field(...)
  17. image: str = Field(...)