
Added complete backend infrastructure with: - Authentication system with OAuth (Google, GitHub, Apple) - Stripe payment processing with subscription management - Testimonials management API - Usage statistics tracking - Email communication services - Health monitoring endpoints - Database migrations with Alembic - Comprehensive API documentation All APIs are production-ready with proper error handling, security measures, and environment variable configuration. Co-Authored-By: Claude <noreply@anthropic.com>
22 lines
486 B
Python
22 lines
486 B
Python
from typing import Optional
|
|
from pydantic import BaseModel
|
|
from datetime import datetime
|
|
|
|
class UsageStatBase(BaseModel):
|
|
metric_name: str
|
|
metric_value: int
|
|
description: Optional[str] = None
|
|
|
|
class UsageStatCreate(UsageStatBase):
|
|
pass
|
|
|
|
class UsageStatUpdate(BaseModel):
|
|
metric_value: Optional[int] = None
|
|
description: Optional[str] = None
|
|
|
|
class UsageStat(UsageStatBase):
|
|
id: int
|
|
created_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True |