src/Entity/ProductConfiguration.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProductConfigurationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Uid\Uuid;
  6. #[ORM\Entity(repositoryClassProductConfigurationRepository::class)]
  7. class ProductConfiguration
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type"integer")]
  12.     private $id;
  13.     #[ORM\Column(type"string"nullabletrue)]
  14.     private $code;
  15.     #[ORM\Column(type"json"nullabletrue)]
  16.     private $json = [];
  17.     public function __construct()
  18.     {
  19.         $this->code Uuid::v4()->toBase32();
  20.     }
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getCode(): ?string
  26.     {
  27.         return $this->code;
  28.     }
  29.     public function getJson(): ?array
  30.     {
  31.         return $this->json;
  32.     }
  33.     public function setJson(?array $json): self
  34.     {
  35.         $this->json $json;
  36.         return $this;
  37.     }
  38. }