MCPcopy Create free account
hub / github.com/PacktPublishing/Full-Stack-FastAPI-React-and-MongoDB / CarBase

Class CarBase

chapter8/backend/models.py:68–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66
67
68class CarBase(MongoBaseModel):
69
70 brand: str = Field(..., min_length=3)
71 make: str = Field(..., min_length=1)
72 year: int = Field(..., gt=1975, lt=2023)
73 price: int = Field(...)
74 km: int = Field(...)
75 cm3: int = Field(..., gt=600, lt=8000)
76 picture: Optional[str] = None
77
78
79class CarDB(CarBase):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected