src/Entity/Product/ProductAttributeValue.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Product;
  3. use App\Repository\Product\ProductAttributeValueRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassProductAttributeValueRepository::class)]
  6. class ProductAttributeValue
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne(inversedBy'productAttributeValues')]
  13.     private ?Product $product null;
  14.     #[ORM\ManyToOne(inversedBy'productAttributeValues')]
  15.     private ?Attribute $attribute null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $value null;
  18.     #[ORM\ManyToOne(inversedBy'productAttributesValues'cascade: ['persist'])]
  19.     private ?ProductVariant $productVariant null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getProduct(): ?Product
  25.     {
  26.         return $this->product;
  27.     }
  28.     public function setProduct(?Product $product): static
  29.     {
  30.         $this->product $product;
  31.         return $this;
  32.     }
  33.     public function getAttribute(): ?Attribute
  34.     {
  35.         return $this->attribute;
  36.     }
  37.     public function setAttribute(?Attribute $attribute): static
  38.     {
  39.         $this->attribute $attribute;
  40.         return $this;
  41.     }
  42.     public function getValue(): ?string
  43.     {
  44.         return $this->value;
  45.     }
  46.     public function setValue(string $value): static
  47.     {
  48.         $this->value $value;
  49.         return $this;
  50.     }
  51.     public function getProductVariant(): ?ProductVariant
  52.     {
  53.         return $this->productVariant;
  54.     }
  55.     public function setProductVariant(?ProductVariant $productVariant): static
  56.     {
  57.         $this->productVariant $productVariant;
  58.         return $this;
  59.     }
  60. }