Skip to content

Commit

Permalink
WIP in resource : add Province
Browse files Browse the repository at this point in the history
  • Loading branch information
julkwel committed Jan 15, 2024
1 parent 8843b60 commit f8bb71d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Entity/Province.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Types\UuidType;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Uid\Uuid;

#[ORM\Entity(repositoryClass: ProvinceRepository::class)]
#[ApiResource(
Expand All @@ -30,13 +31,13 @@ class Province
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
#[Groups(['province:read'])]
private ?int $id = null;
private ?Uuid $id = null;

#[ORM\Column(length: 255)]
#[Groups(['province:read'])]
private ?string $name = null;

public function getId(): ?int
public function getId(): ?string
{
return $this->id;
}
Expand Down

0 comments on commit f8bb71d

Please sign in to comment.