services:
  order.order_filter:
    parent: 'api_platform.doctrine.orm.order_filter'
    arguments:
      $properties: { id: ~, reference: ~, customer.firstName: ~, customer.lastName: ~, amount: ~, state: ~, createdAt: ~, updatedAt: ~ }
      $orderParameterName: order
    tags: [ 'api_platform.filter' ]

  order.global_search_filter:
    parent: 'api.filter.global_search_filter'
    arguments:
      $properties: [
        'reference',
        'customer.firstName',
        'customer.lastName',
        'customer.email',
        'state',
        'amount',
      ]
    tags: [ 'api_platform.filter' ]

  order.customer_search_filter:
    parent: 'api.filter.global_search_filter'
    arguments:
      $parameterName: 'customer'
      $properties: [
        'customer.firstName',
        'customer.lastName',
      ]
    tags: [ 'api_platform.filter' ]

  order.search_filter:
    parent: 'api_platform.doctrine.orm.search_filter'
    arguments: [ { id: 'exact', paymentMode: 'exact', email: 'partial', reference: 'partial', customer.id: 'exact', customer.firstName: 'partial', customer.user_type: 'exact', customer.lastName: 'partial', tva: 'exact',amount: 'exact', state: 'exact', createdAt: 'exact', updatedAt: 'exact' } ]
    tags: [ 'api_platform.filter' ]