Automated Action 1d312e5ff6 Implement Small Business Inventory Management System
- Created FastAPI application with SQLite database
- Implemented models for inventory items, categories, suppliers, and transactions
- Added authentication system with JWT tokens
- Implemented CRUD operations for all models
- Set up Alembic for database migrations
- Added comprehensive API documentation
- Configured Ruff for code linting
2025-06-06 20:27:41 +00:00

18 lines
498 B
Python

from sqlalchemy import Column, Integer, String
from sqlalchemy.orm import relationship
from app.db.base import Base
class Category(Base):
"""
Category model for categorizing inventory items.
"""
__tablename__ = "categories"
id = Column(Integer, primary_key=True, index=True)
name = Column(String, index=True, nullable=False, unique=True)
description = Column(String, nullable=True)
# Relationships
items = relationship("Item", back_populates="category")