Admin Panel: - User Detail Modal with full profile info - Bulk tier upgrade for multiple users - User export to CSV - Price Alerts overview tab - Domain Health Check trigger - Email Test functionality - Scheduler Status with job info and last runs - Activity Log for admin actions - Blog management tab with CRUD Blog System: - BlogPost model with full content management - Public API: list, featured, categories, single post - Admin API: create, update, delete, publish/unpublish - Frontend blog listing page with categories - Frontend blog detail page with styling - View count tracking OAuth: - Google OAuth integration - GitHub OAuth integration - OAuth callback handling - Provider selection on login/register Other improvements: - Domain checker with check_all_domains function - Admin activity logging - Breadcrumbs component - Toast notification component - Various UI/UX improvements
43 lines
993 B
Python
43 lines
993 B
Python
"""Subscription schemas."""
|
|
from datetime import datetime
|
|
from typing import Optional, Dict, List
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class SubscriptionResponse(BaseModel):
|
|
"""Schema for subscription response."""
|
|
id: int
|
|
tier: str
|
|
tier_name: str
|
|
status: str
|
|
domain_limit: int
|
|
domains_used: int = 0
|
|
portfolio_limit: int = 0
|
|
check_frequency: str
|
|
history_days: int
|
|
features: Dict[str, bool]
|
|
started_at: datetime
|
|
expires_at: Optional[datetime]
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class SubscriptionTierInfo(BaseModel):
|
|
"""Schema for subscription tier information."""
|
|
id: str
|
|
name: str
|
|
domain_limit: int
|
|
price: float
|
|
check_frequency: str
|
|
features: List[str]
|
|
feature_flags: Dict[str, bool]
|
|
|
|
|
|
class SubscriptionUpdate(BaseModel):
|
|
"""Schema for updating subscription (admin/payment webhook)."""
|
|
tier: str
|
|
expires_at: Optional[datetime] = None
|
|
payment_reference: Optional[str] = None
|