const db = require("../models");
const PurchaseHistory = db.purchase_history;
const Op = db.Sequelize.Op;
 

exports.findAll = (req, res) => {
 
  var condition = { status: 'active' };
  PurchaseHistory.findAll({ where: condition,order: [
        ['name', 'ASC'],
    ]})
    .then(data => {
      res.send(data);
    })
    .catch(err => {
      res.status(500).send({
        message:
          err.message || "Some error occurred while retrieving tutorials."
      });
    });
};
 
