Automated Action d4b0ceed9c Implement Task Manager API with FastAPI and SQLite
- Setup project structure and FastAPI application
- Configure SQLite database with SQLAlchemy ORM
- Setup Alembic for database migrations
- Implement user authentication with JWT
- Create task models and CRUD operations
- Implement task assignment functionality
- Add detailed API documentation
- Create comprehensive README with usage instructions
- Lint code with Ruff
2025-06-08 18:02:43 +00:00

45 lines
950 B
Python

from datetime import datetime
from typing import Optional
from pydantic import BaseModel, ConfigDict, EmailStr
# Shared properties
class UserBase(BaseModel):
email: Optional[EmailStr] = None
username: Optional[str] = None
is_active: Optional[bool] = True
is_superuser: bool = False
full_name: Optional[str] = None
# Properties to receive via API on creation
class UserCreate(UserBase):
email: EmailStr
username: str
password: str
# Properties to receive via API on update
class UserUpdate(UserBase):
password: Optional[str] = None
# Properties shared by models stored in DB
class UserInDBBase(UserBase):
id: int
created_at: datetime
updated_at: datetime
model_config = ConfigDict(from_attributes=True)
# Properties to return via API
class User(UserInDBBase):
pass
# Additional properties stored in DB but not returned by API
class UserInDB(UserInDBBase):
hashed_password: str