module.exports = (req, res, next) => {
  const page = parseInt(req.query.page) || 1;
  const limit = parseInt(req.query.limit) || 10;
  const sellerLimit = parseInt(req.query.sellerLimit);
  const productLimit = parseInt(req.query.productLimit);
  const sellerCompanyLimit = parseInt(req.query.sellerCompanyLimit);

  req.pagination = {
    page: page,
    limit: limit,
    sellerLimit: sellerLimit,
    productLimit: productLimit,
    sellerCompanyLimit: sellerCompanyLimit,
  };

  next();
};
