<?phpnamespace App\Entity;use App\Repository\TrCategorieRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=TrCategorieRepository::class) */class TrCategorie{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $LIBELLE; /** * @ORM\OneToMany(targetEntity=TrProduits::class, mappedBy="CATEGORIE") */ private $trProduits; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $Description; /** * @ORM\OneToMany(targetEntity=TrProduitsMasse::class, mappedBy="CATEGORIE") */ private $trProduitsMasses; public function __construct() { $this->trProduits = new ArrayCollection(); $this->trProduitsMasses = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getLIBELLE(): ?string { return $this->LIBELLE; } public function setLIBELLE(string $LIBELLE): self { $this->LIBELLE = $LIBELLE; return $this; } /** * @return Collection<int, TrProduits> */ public function getTrProduits(): Collection { return $this->trProduits; } public function addTrProduit(TrProduits $trProduit): self { if (!$this->trProduits->contains($trProduit)) { $this->trProduits[] = $trProduit; $trProduit->setCATEGORIE($this); } return $this; } public function removeTrProduit(TrProduits $trProduit): self { if ($this->trProduits->removeElement($trProduit)) { // set the owning side to null (unless already changed) if ($trProduit->getCATEGORIE() === $this) { $trProduit->setCATEGORIE(null); } } return $this; } public function getDescription(): ?string { return $this->Description; } public function setDescription(?string $Description): self { $this->Description = $Description; return $this; } public function __toString() { return $this->LIBELLE; } /** * @return Collection<int, TrProduitsMasse> */ public function getTrProduitsMasses(): Collection { return $this->trProduitsMasses; } public function addTrProduitsMass(TrProduitsMasse $trProduitsMass): self { if (!$this->trProduitsMasses->contains($trProduitsMass)) { $this->trProduitsMasses[] = $trProduitsMass; $trProduitsMass->setCATEGORIE($this); } return $this; } public function removeTrProduitsMass(TrProduitsMasse $trProduitsMass): self { if ($this->trProduitsMasses->removeElement($trProduitsMass)) { // set the owning side to null (unless already changed) if ($trProduitsMass->getCATEGORIE() === $this) { $trProduitsMass->setCATEGORIE(null); } } return $this; }}