Skip to content

Commit

Permalink
Added icons to group
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvdlinde committed Jan 23, 2020
1 parent a850dfc commit 6a12e6f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
25 changes: 24 additions & 1 deletion api/src/Entity/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion api/src/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6a12e6f

Please sign in to comment.