summaryrefslogtreecommitdiff
path: root/app/queries/searches/product_search.rb
blob: d4262119d7b2bfb89076cc249e0dd51ef94a5b76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

module Searches
  # ProductSearch
  class ProductSearch < BaseSearch
    def call
      @scope_filter.by_name
                   .by_company
                   .by_category
                   .order_by_available_quantity
                   .order_by_price
                   .order_by_bulk_price
                   .query_result
    end
  end
end