Automated Action 2de9589e3d Initial Travel App Backend Implementation
- FastAPI application with user management, destinations, and trip planning
- SQLite database with SQLAlchemy ORM
- Database models for Users, Destinations, and Trips
- Pydantic schemas for request/response validation
- Full CRUD API endpoints for all resources
- Alembic migrations setup
- Health check endpoint
- CORS configuration for development
- Comprehensive documentation and README
2025-06-20 01:25:27 +00:00

28 lines
490 B
Python

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