
- Created project structure with FastAPI framework - Set up SQLite database with SQLAlchemy ORM - Implemented models: User, Item, Supplier, Transaction - Created CRUD operations for all models - Added API endpoints for all resources - Implemented JWT authentication and authorization - Added Alembic migration scripts - Created health endpoint - Updated documentation generated with BackendIM... (backend.im)
13 lines
470 B
Python
13 lines
470 B
Python
from sqlalchemy import Boolean, Column, Integer, String
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from app.db.base_class import Base
|
|
|
|
|
|
class User(Base):
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
full_name = Column(String, index=True)
|
|
email = Column(String, unique=True, index=True, nullable=False)
|
|
hashed_password = Column(String, nullable=False)
|
|
is_active = Column(Boolean(), default=True)
|
|
is_superuser = Column(Boolean(), default=False) |