<?phpnamespace App\Entity;use App\Repository\CategorieRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=CategorieRepository::class) */class Categorie{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $name; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $description; /** * @ORM\Column(type="string", length=255) */ private $idYouscribe; /** * @ORM\Column(type="json", nullable=true) */ private $themes = []; /** * @ORM\OneToMany(targetEntity=Produit::class, mappedBy="categorie") */ private $produits; /** * @ORM\Column(type="string", length=255) */ private $orderNum; public function __construct() { $this->produits = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(?string $name): self { $this->name = $name; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; } public function getIdYouscribe(): ?string { return $this->idYouscribe; } public function setIdYouscribe(string $idYouscribe): self { $this->idYouscribe = $idYouscribe; return $this; } public function getThemes(): ?array { return $this->themes; } public function setThemes(?array $themes): self { $this->themes = $themes; return $this; } /** * @return Collection|Produit[] */ public function getProduits(): Collection { return $this->produits; } public function addProduit(Produit $produit): self { if (!$this->produits->contains($produit)) { $this->produits[] = $produit; $produit->setCategorie($this); } return $this; } public function removeProduit(Produit $produit): self { if ($this->produits->removeElement($produit)) { // set the owning side to null (unless already changed) if ($produit->getCategorie() === $this) { $produit->setCategorie(null); } } return $this; } public function getOrderNum(): ?string { return $this->orderNum; } public function setOrderNum(string $orderNum): self { $this->orderNum = $orderNum; return $this; }}