diff --git a/api/src/Entity/Group.php b/api/src/Entity/Group.php index 64af5ac0..3048ebc8 100644 --- a/api/src/Entity/Group.php +++ b/api/src/Entity/Group.php @@ -46,7 +46,18 @@ class Group * @ORM\GeneratedValue(strategy="CUSTOM") * @ORM\CustomIdGenerator(class="Ramsey\Uuid\Doctrine\UuidGenerator") */ - private $id; + private $id; + + /** + * @var string The icon of this property + * + * @example My Property + * + * @Assert\Length(min = 15, max = 255) + * @Groups({"read", "write"}) + * @ORM\Column(type="string", length=255, nullable=true) + */ + private $icon; /** * @var string The name of this product group @@ -141,6 +152,18 @@ public function setId(Uuid $id): self return $this; } + + public function getIcon(): ?string + { + return $this->icon; + } + + public function setIcon(?string $icon): self + { + $this->icon = $icon; + + return $this; + } public function getName(): ?string { diff --git a/api/src/Entity/Product.php b/api/src/Entity/Product.php index f59eec12..a2cb86fc 100644 --- a/api/src/Entity/Product.php +++ b/api/src/Entity/Product.php @@ -2,8 +2,8 @@ namespace App\Entity; -use ApiPlatform\Core\Annotation\ApiFilter; use ApiPlatform\Core\Annotation\ApiResource; +use ApiPlatform\Core\Annotation\ApiFilter; use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter; use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; use Doctrine\Common\Collections\ArrayCollection;