Converted Item model to use query API from SQLAlchemy.