<?php
namespace App\Entity;
use App\Repository\AccessoiresDeChambreRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=AccessoiresDeChambreRepository::class)
*/
class AccessoiresDeChambre
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $labels;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $slugAccessoiresDeChambre;
/**
* @ORM\ManyToMany(targetEntity=Product::class, inversedBy="accessoiresDeChambres")
*/
private $product;
public function __construct()
{
$this->product = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getLabels(): ?string
{
return $this->labels;
}
public function setLabels(?string $labels): self
{
$this->labels = $labels;
return $this;
}
public function getSlugAccessoiresDeChambre(): ?string
{
return $this->slugAccessoiresDeChambre;
}
public function setSlugAccessoiresDeChambre(?string $slugAccessoiresDeChambre): self
{
$this->slugAccessoiresDeChambre = $slugAccessoiresDeChambre;
return $this;
}
/**
* @return Collection<int, Product>
*/
public function getProduct(): Collection
{
return $this->product;
}
public function addProduct(Product $product): self
{
if (!$this->product->contains($product)) {
$this->product[] = $product;
}
return $this;
}
public function removeProduct(Product $product): self
{
$this->product->removeElement($product);
return $this;
}
}