|
-
- from fastapi import Form, UploadFile
- from pydantic import BaseModel, Field
- from dataclasses import dataclass
-
-
- class CreateCarPart(BaseModel):
- ParentId: int = Form(...)
- Name: str = Form(...)
- Number: str = Form(...)
- Condition: str = Form(...)
- Cost: int = Form(...)
- image: UploadFile = Form(...)
-
-
-
-
- class ShowCarPart(BaseModel):
- ParentId: int = Field(...)
- Name: str = Field(...)
- Number: str = Field(...)
- Condition: str = Field(...)
- Cost: int = Field(...)
|