Automated Action c9baaa994e Create comprehensive Task Manager API with FastAPI
- Add user authentication with JWT tokens
- Implement task CRUD operations with status and priority
- Set up SQLite database with SQLAlchemy ORM
- Create Alembic migrations for database schema
- Add comprehensive API documentation
- Include health check endpoint and CORS configuration
- Structure codebase with proper separation of concerns
2025-06-20 19:35:55 +00:00

43 lines
742 B
Python

from pydantic import BaseModel, EmailStr
from typing import Optional
from datetime import datetime
class UserBase(BaseModel):
email: EmailStr
full_name: Optional[str] = None
class UserCreate(UserBase):
password: str
class UserUpdate(BaseModel):
email: Optional[EmailStr] = None
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
class UserLogin(BaseModel):
email: EmailStr
password: str
class Token(BaseModel):
access_token: str
token_type: str
class TokenData(BaseModel):
email: Optional[str] = None