Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Pounce Eigenwerbung (from pounce_endgame.md):
- Add 'pounce_promo' as fallback partner for generic/unclear intent domains
- Create dedicated Pounce promo landing page with CTA to register
- Update footer on all yield pages: 'Monetized by Pounce • Own a domain? Start yielding'
Tech/Investment Domain Detection:
- Add 'investment_domains' category (invest, crypto, trading, domain, startup)
- Add 'tech_dev' category (developer, web3, fintech, proptech)
- Both categories have 'pounce_affinity' flag for higher Pounce conversion
Referral Tracking for Domain Owners:
- Add user fields: referred_by_user_id, referred_by_domain, referral_code
- Parse yield referral codes (yield_{user_id}_{domain_id}) on registration
- Domain owners earn lifetime commission when visitors sign up via their domain
DB Migrations:
- Add referral tracking columns to users table
54 lines
1.2 KiB
Python
54 lines
1.2 KiB
Python
"""Authentication schemas."""
|
|
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
from pydantic import BaseModel, EmailStr, Field
|
|
|
|
|
|
class UserCreate(BaseModel):
|
|
"""Schema for user registration."""
|
|
email: EmailStr
|
|
password: str = Field(..., min_length=8, max_length=100)
|
|
name: Optional[str] = Field(None, max_length=100)
|
|
# Yield referral tracking
|
|
ref: Optional[str] = Field(None, max_length=100, description="Referral code from yield domain")
|
|
|
|
|
|
class UserLogin(BaseModel):
|
|
"""Schema for user login."""
|
|
email: EmailStr
|
|
password: str
|
|
|
|
|
|
class UserResponse(BaseModel):
|
|
"""Schema for user response."""
|
|
id: int
|
|
email: str
|
|
name: Optional[str]
|
|
is_active: bool
|
|
is_verified: bool
|
|
is_admin: bool = False
|
|
created_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class Token(BaseModel):
|
|
"""Schema for JWT token response."""
|
|
access_token: str
|
|
token_type: str = "bearer"
|
|
expires_in: int
|
|
|
|
|
|
class LoginResponse(BaseModel):
|
|
"""Login response when using HttpOnly cookie authentication."""
|
|
expires_in: int
|
|
|
|
|
|
class TokenData(BaseModel):
|
|
"""Schema for token payload data."""
|
|
user_id: Optional[int] = None
|
|
email: Optional[str] = None
|
|
|