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

17 lines
628 B
Python

from datetime import datetime
from sqlalchemy import Column, Integer, String, DateTime, Text
from app.db.base import Base
class Supplier(Base):
__tablename__ = "suppliers"
id = Column(Integer, primary_key=True, index=True)
name = Column(String(200), nullable=False, index=True)
contact_person = Column(String(100), nullable=True)
email = Column(String(100), nullable=True)
phone = Column(String(20), nullable=True)
address = Column(Text, nullable=True)
created_at = Column(DateTime, default=datetime.utcnow)
updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)