
- Created complete RESTful API for inventory management - Set up database models for items, categories, suppliers, and transactions - Implemented user authentication with JWT tokens - Added transaction tracking for inventory movements - Created comprehensive API endpoints for all CRUD operations - Set up Alembic for database migrations - Added input validation and error handling - Created detailed documentation in README
14 lines
312 B
Python
14 lines
312 B
Python
from typing import Any
|
|
|
|
from sqlalchemy.ext.declarative import as_declarative, declared_attr
|
|
|
|
|
|
@as_declarative()
|
|
class Base:
|
|
id: Any
|
|
__name__: str
|
|
|
|
# Generate __tablename__ automatically based on class name
|
|
@declared_attr
|
|
def __tablename__(cls) -> str:
|
|
return cls.__name__.lower() |