
- Set up project structure for FastAPI application - Create database models for items, categories, suppliers, and transactions - Set up Alembic for database migrations - Implement API endpoints for all entities - Add authentication with JWT tokens - Add health check endpoint - Create comprehensive README with documentation
16 lines
464 B
Python
16 lines
464 B
Python
from sqlalchemy import Column, String, Text
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from app.db.base import Base
|
|
from app.db.base_class import BaseModel
|
|
|
|
|
|
class Category(Base, BaseModel):
|
|
"""Category model for organizing inventory items."""
|
|
__tablename__ = "categories"
|
|
|
|
name = Column(String, index=True, nullable=False)
|
|
description = Column(Text, nullable=True)
|
|
|
|
# Relationships
|
|
items = relationship("Item", back_populates="category") |