
- Created FastAPI application with SQLite database - Implemented models for inventory items, categories, suppliers, and transactions - Added authentication system with JWT tokens - Implemented CRUD operations for all models - Set up Alembic for database migrations - Added comprehensive API documentation - Configured Ruff for code linting
18 lines
409 B
Python
18 lines
409 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class Token(BaseModel):
|
|
"""
|
|
Schema for the token response.
|
|
"""
|
|
access_token: str = Field(..., description="JWT access token")
|
|
token_type: str = Field(..., description="Token type (bearer)")
|
|
|
|
|
|
class TokenPayload(BaseModel):
|
|
"""
|
|
Schema for the token payload (JWT claims).
|
|
"""
|
|
username: Optional[str] = None |