
This commit implements a comprehensive inventory management system for small businesses using FastAPI and SQLAlchemy. Features include: - Product and category management - Inventory tracking across multiple locations - Supplier management - Purchase management - Transaction tracking for inventory movements - Complete API documentation generated with BackendIM... (backend.im)
10 lines
368 B
Python
10 lines
368 B
Python
from sqlalchemy import Column, Integer, DateTime, func
|
|
from app.db.session import Base
|
|
|
|
class BaseModel(Base):
|
|
"""Base model for all database models"""
|
|
__abstract__ = True
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
created_at = Column(DateTime, default=func.now())
|
|
updated_at = Column(DateTime, default=func.now(), onupdate=func.now()) |