
- 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
27 lines
472 B
Python
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 |