refactor: switch to free-trial/private-deploy/buyout pricing, fix feature gaps, add SEO landing + deploy config

This commit is contained in:
TradeMate Dev
2026-07-12 08:09:28 +08:00
parent 9ca5d79d8a
commit 04924e3bc4
36 changed files with 1026 additions and 975 deletions
+34
View File
@@ -0,0 +1,34 @@
from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.ext.asyncio import AsyncSession
from pydantic import BaseModel, EmailStr
from app.database import get_db
from app.models.enterprise_lead import EnterpriseLead
router = APIRouter()
class LeadCreate(BaseModel):
type: str # private | buyout
name: str
company: str = ""
phone: str = ""
email: str = ""
message: str = ""
@router.post("")
async def create_lead(payload: LeadCreate, db: AsyncSession = Depends(get_db)):
if payload.type not in ("private", "buyout"):
raise HTTPException(status_code=400, detail="Invalid lead type")
lead = EnterpriseLead(
type=payload.type,
name=payload.name,
company=payload.company,
phone=payload.phone,
email=payload.email,
message=payload.message,
)
db.add(lead)
await db.flush()
await db.refresh(lead)
return {"id": lead.id, "type": lead.type, "status": lead.status}