- Added centralized, self-learning GeoService (ZIP, City, Street) - Implemented Hybrid Address Management (Centralized table + Denormalized fields) - Fixed Gamification logic (PointsLedger field names & filtering) - Added address autocomplete and two-tier (Free/Premium) search API - Synchronized UserStats and PointsLedger schemas
49 lines
1.1 KiB
Python
49 lines
1.1 KiB
Python
from pydantic import BaseModel, EmailStr, Field
|
|
from typing import Optional, Dict
|
|
from datetime import date
|
|
|
|
# --- STEP 1: LITE REGISTRATION ---
|
|
class UserLiteRegister(BaseModel):
|
|
email: EmailStr
|
|
password: str = Field(..., min_length=8)
|
|
first_name: str
|
|
last_name: str
|
|
region_code: str = "HU"
|
|
|
|
class UserLogin(BaseModel):
|
|
email: EmailStr
|
|
password: str
|
|
|
|
# --- STEP 2: KYC & ONBOARDING ---
|
|
class ICEContact(BaseModel):
|
|
name: str
|
|
phone: str
|
|
relationship: Optional[str] = None
|
|
|
|
class DocumentDetail(BaseModel):
|
|
number: str
|
|
expiry_date: date
|
|
|
|
class UserKYCComplete(BaseModel):
|
|
phone_number: str
|
|
birth_place: str
|
|
birth_date: date
|
|
mothers_name: str
|
|
identity_docs: Dict[str, DocumentDetail]
|
|
ice_contact: ICEContact
|
|
|
|
# --- COMMON & SECURITY ---
|
|
class PasswordResetRequest(BaseModel):
|
|
email: EmailStr
|
|
|
|
# EZ HIÁNYZOTT KORÁBBAN:
|
|
class PasswordResetConfirm(BaseModel):
|
|
email: EmailStr
|
|
token: str
|
|
password: str = Field(..., min_length=8)
|
|
password_confirm: str = Field(..., min_length=8)
|
|
|
|
class Token(BaseModel):
|
|
access_token: str
|
|
token_type: str
|
|
is_active: bool |