feat: Add promo preference survey on main page

- Add promo preference fields to User model (promo_preferred_maker,
  promo_preferred_model, promo_email_enabled)
- Create API endpoints for getting/updating promo preferences
- Create PromoPreference component with maker/model selection
- Show login prompt for non-logged-in users when interacting
- Add promo notification service to send emails when matching vehicles
  are added to promotion
- Add multi-language translations (en, mn, ru, ko)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
AutonetSellCar Deploy
2026-01-12 23:37:31 +09:00
parent 2378392f95
commit 2720689515
10 changed files with 618 additions and 11 deletions

View File

@@ -42,12 +42,31 @@ class UserResponse(BaseModel):
referral_code: Optional[str] = None # User's unique referral code
email_verified: bool = False
phone_verified: bool = False
promo_preferred_maker: Optional[str] = None
promo_preferred_model: Optional[str] = None
promo_email_enabled: bool = False
created_at: datetime
class Config:
from_attributes = True
class PromoPreferenceUpdate(BaseModel):
"""Schema for updating promo preference"""
promo_preferred_maker: Optional[str] = None
promo_preferred_model: Optional[str] = None
promo_email_enabled: bool = False
class PromoPreferenceResponse(BaseModel):
promo_preferred_maker: Optional[str] = None
promo_preferred_model: Optional[str] = None
promo_email_enabled: bool = False
class Config:
from_attributes = True
class CarViewResponse(BaseModel):
id: int
user_id: int