Skip to content

Commit

Permalink
Merge pull request #199 from jurv/searchable-trait-attributes
Browse files Browse the repository at this point in the history
Add attribute notation to SearchableTrait
  • Loading branch information
maximehuran committed Nov 21, 2023
2 parents 0080b37 + 2d748ca commit 00e9fb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Model/Product/SearchableTrait.php
Expand Up @@ -20,16 +20,19 @@ trait SearchableTrait
/**
* @ORM\Column(name="searchable", type="boolean", nullable=false, options={"default"=false})
*/
#[ORM\Column(name: 'searchable', type: 'boolean', nullable: false, options: ['default' => false])]
protected bool $searchable = false;

/**
* @ORM\Column(name="filterable", type="boolean", nullable=false, options={"default"=false})
*/
#[ORM\Column(name: 'filterable', type: 'boolean', nullable: false, options: ['default' => false])]
protected bool $filterable = false;

/**
* @ORM\Column(name="search_weight", type="smallint", nullable=false, options={"default"=1, "unsigned"=true})
*/
#[ORM\Column(name: 'search_weight', type: 'smallint', nullable: false, options: ['default' => 1, 'unsigned' => true])]
protected int $searchWeight = 1;

public function isSearchable(): bool
Expand Down

0 comments on commit 00e9fb6

Please sign in to comment.