Automated Action 447799c9a0 Implement complete FastAPI inventory management system for small businesses
Features implemented:
- Product management with CRUD operations
- Category and supplier management
- Stock movement tracking with automatic updates
- Inventory reports and analytics
- SQLite database with Alembic migrations
- Health monitoring endpoints
- CORS configuration for API access
- Comprehensive API documentation
- Code quality with Ruff linting and formatting

The system provides a complete backend solution for small business inventory management with proper database relationships, stock tracking, and reporting capabilities.
2025-07-23 09:07:46 +00:00

14 lines
497 B
Python

from datetime import datetime
from sqlalchemy import Column, Integer, String, DateTime, Text
from app.db.base import Base
class Category(Base):
__tablename__ = "categories"
id = Column(Integer, primary_key=True, index=True)
name = Column(String(100), unique=True, nullable=False, index=True)
description = Column(Text, nullable=True)
created_at = Column(DateTime, default=datetime.utcnow)
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)