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
690 B
Python

from sqlalchemy import Column, String, Boolean
from sqlalchemy.orm import relationship
from app.db.base import Base
from app.db.base_class import BaseModel
class User(Base, BaseModel):
"""User model for authentication and authorization."""
__tablename__ = "users"
email = Column(String, unique=True, index=True, nullable=False)
hashed_password = Column(String, nullable=False)
full_name = Column(String, nullable=True)
is_active = Column(Boolean, default=True)
is_superuser = Column(Boolean, default=False)
# Relationships
items = relationship("Item", back_populates="owner")
transactions = relationship("Transaction", back_populates="user")