src/Entity/Gos/SalesManagoAutoTag.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\SalesManagoAutoTagRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SalesManagoAutoTagRepository::class)
  9.  */
  10. class SalesManagoAutoTag
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $name;
  22.     /**
  23.      * @ORM\ManyToMany(targetEntity=ProductVariant::class)
  24.      */
  25.     private $productVariants;
  26.     /**
  27.      * @ORM\Column(type="string", length=255)
  28.      */
  29.     private $tags;
  30.     public function __construct()
  31.     {
  32.         $this->productVariants = new ArrayCollection();
  33.     }
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getName(): ?string
  39.     {
  40.         return $this->name;
  41.     }
  42.     public function setName(string $name): self
  43.     {
  44.         $this->name $name;
  45.         return $this;
  46.     }
  47.     /**
  48.      * @return Collection|ProductVariant[]
  49.      */
  50.     public function getProductVariants(): Collection
  51.     {
  52.         return $this->productVariants;
  53.     }
  54.     public function addProductVariant(ProductVariant $productVariant): self
  55.     {
  56.         if (!$this->productVariants->contains($productVariant)) {
  57.             $this->productVariants[] = $productVariant;
  58.         }
  59.         return $this;
  60.     }
  61.     public function removeProductVariant(ProductVariant $productVariant): self
  62.     {
  63.         if ($this->productVariants->contains($productVariant)) {
  64.             $this->productVariants->removeElement($productVariant);
  65.         }
  66.         return $this;
  67.     }
  68.     public function getTags(): ?string
  69.     {
  70.         return $this->tags;
  71.     }
  72.     public function setTags(string $tags): self
  73.     {
  74.         $this->tags $tags;
  75.         return $this;
  76.     }
  77. }