
- Set up project structure with FastAPI and SQLite - Created database models for users, categories, suppliers, items, and stock transactions - Implemented Alembic for database migrations with proper absolute paths - Built comprehensive CRUD operations for all entities - Added JWT-based authentication and authorization system - Created RESTful API endpoints for all inventory operations - Implemented search, filtering, and low stock alerts - Added health check endpoint and base URL response - Configured CORS for all origins - Set up Ruff for code linting and formatting - Updated README with comprehensive documentation and usage examples The system provides complete inventory management functionality for small businesses including product tracking, supplier management, stock transactions, and reporting. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
17 lines
621 B
Python
17 lines
621 B
Python
from sqlalchemy import Column, Integer, String, DateTime, Boolean
|
|
from datetime import datetime
|
|
from app.db.base import Base
|
|
|
|
|
|
class User(Base):
|
|
__tablename__ = "users"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
email = Column(String, unique=True, index=True, nullable=False)
|
|
hashed_password = Column(String, nullable=False)
|
|
full_name = Column(String)
|
|
is_active = Column(Boolean, default=True)
|
|
is_superuser = Column(Boolean, default=False)
|
|
created_at = Column(DateTime, default=datetime.utcnow)
|
|
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
|