src/Entity/ProductField.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProductFieldRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=ProductFieldRepository::class)
  7.  */
  8. class ProductField
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="productFields")
  18.      * @ORM\JoinColumn(nullable=false)
  19.      */
  20.     private $product;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=ProductTypeField::class, inversedBy="productFields")
  23.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  24.      */
  25.     private $product_type_field;
  26.     /**
  27.      * @ORM\Column(type="text", nullable=true)
  28.      */
  29.     private $value;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getProduct(): ?Product
  35.     {
  36.         return $this->product;
  37.     }
  38.     public function setProduct(?Product $product): self
  39.     {
  40.         $this->product $product;
  41.         return $this;
  42.     }
  43.     public function getProductTypeField(): ?ProductTypeField
  44.     {
  45.         return $this->product_type_field;
  46.     }
  47.     public function setProductTypeField(?ProductTypeField $product_type_field): self
  48.     {
  49.         $this->product_type_field $product_type_field;
  50.         return $this;
  51.     }
  52.     public function getValue(): ?string
  53.     {
  54.         return $this->value;
  55.     }
  56.     public function setValue(?string $value): self
  57.     {
  58.         $this->value $value;
  59.         return $this;
  60.     }
  61. }