Add directly purchased cars to My Requests page
- Add new /my-vehicles API endpoint returning both recommended and direct purchases - Add DirectPurchasedCarResponse and MyVehiclesResponse schemas - Update frontend to display directly purchased cars (from banners with 1CC) - Show separate collapsible section for direct purchases 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -123,3 +123,21 @@ class VehicleRequestWithVehicles(BaseModel):
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# Directly purchased car (from CarView - when user pays 1CC on banner car)
|
||||
class DirectPurchasedCarResponse(BaseModel):
|
||||
id: int # CarView id
|
||||
car_id: int
|
||||
car_data: dict # Car details for display
|
||||
cc_paid: float
|
||||
purchased_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# Full response including both recommended and directly purchased cars
|
||||
class MyVehiclesResponse(BaseModel):
|
||||
vehicle_requests: List[VehicleRequestWithVehicles]
|
||||
direct_purchases: List[DirectPurchasedCarResponse] # Cars purchased directly from banner
|
||||
|
||||
Reference in New Issue
Block a user