services:
  advert.exist_filter:
    parent: 'api_platform.doctrine.orm.exists_filter'
    arguments: [ { views: ~ } ]
    tags:  [ 'api_platform.filter' ]

  advert.order_filter:
    parent: 'api_platform.doctrine.orm.order_filter'
    arguments:
      $properties: { id: ~, title: ~, reference: ~, type: ~, createdAt: ~, updatedAt: ~, state: ~, activityArea: ~, prospectingArea: ~}
      $orderParameterName: order
    tags: [ 'api_platform.filter' ]

  advert.global_search_filter:
    parent: 'api.filter.global_search_filter'
    arguments:
      $properties: [
        'title',
        'type',
        'state',
        'owner.firstName',
        'owner.lastName',
      ]
    tags: [ 'api_platform.filter' ]

  advert.owner_search_filter:
    parent: 'api.filter.global_search_filter'
    arguments:
      $parameterName: 'owner'
      $properties: [
        'owner.firstName',
        'owner.lastName',
      ]
    tags: [ 'api_platform.filter' ]

  advert.published_filter:
    parent: 'api.filter.advert_published_filter'
    arguments:
      $properties: [
        'title',
        'type',
        'state',
        'owner.firstName',
        'owner.lastName',
      ]
    tags: [ 'api_platform.filter' ]

  advert.search_filter:
    parent: 'api_platform.doctrine.orm.search_filter'
    arguments: [ { id: 'exact', title: 'partial', reference: 'exact', type: 'exact', owner.id: 'exact', state: 'exact', activityArea: 'exact', prospectingArea: 'exact', prospectingAreaDetail: 'partial' } ]
    tags:  [ 'api_platform.filter' ]

  advert.boolean_filter:
    parent: 'api_platform.doctrine.orm.boolean_filter'
    arguments: [ { anonymously: ~ , published: ~ } ]
    tags:  [ 'api_platform.filter' ]
