Automated Action becbb01753 Implement small business inventory system with FastAPI and SQLite
- 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
2025-06-12 11:24:38 +00:00

20 lines
628 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 Supplier(Base, BaseModel):
"""Supplier model for inventory item sources."""
__tablename__ = "suppliers"
name = Column(String, index=True, nullable=False)
contact_name = Column(String, nullable=True)
email = Column(String, nullable=True)
phone = Column(String, nullable=True)
address = Column(Text, nullable=True)
notes = Column(Text, nullable=True)
# Relationships
items = relationship("Item", back_populates="supplier")