Automated Action 07f6a51f6f Add complete FastAPI backend for AI tutor application
- User authentication with JWT tokens (register/login)
- Tutor session management with CRUD operations
- Message tracking for tutor conversations
- SQLite database with Alembic migrations
- CORS configuration for frontend integration
- Health check and service info endpoints
- Proper project structure with models, schemas, and API routes
2025-06-23 17:55:19 +00:00

27 lines
472 B
Python

from pydantic import BaseModel, EmailStr
from datetime import datetime
from typing import Optional
class UserBase(BaseModel):
email: EmailStr
full_name: Optional[str] = None
class UserCreate(UserBase):
password: str
class UserLogin(BaseModel):
email: EmailStr
password: str
class User(UserBase):
id: int
is_active: bool
created_at: datetime
updated_at: Optional[datetime] = None
class Config:
from_attributes = True