
- Set up project structure and FastAPI application - Create database models for users, products, and inventory - Configure SQLAlchemy and Alembic for database management - Implement JWT authentication - Create API endpoints for user, product, and inventory management - Add admin-only routes and authorization middleware - Add health check endpoint - Update README with documentation - Lint and fix code issues
15 lines
276 B
Python
15 lines
276 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class Token(BaseModel):
|
|
"""Token schema."""
|
|
access_token: str
|
|
token_type: str
|
|
|
|
|
|
class TokenPayload(BaseModel):
|
|
"""Token payload schema."""
|
|
sub: Optional[str] = None
|
|
exp: Optional[int] = None |