src/Entity/Marque.php line 11
<?phpnamespace App\Entity;use App\Repository\MarqueRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: MarqueRepository::class)]class Marque{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $code = null;#[ORM\Column(length: 255)]private ?string $marque_libelle = null;#[ORM\OneToMany(mappedBy: 'marque', targetEntity: Article::class)]private Collection $articles;#[ORM\OneToMany(mappedBy: 'marque', targetEntity: Produit::class)]private Collection $produits;#[ORM\OneToMany(mappedBy: 'marque', targetEntity: Statistiques::class)]private Collection $statistiques;public function __construct(){$this->articles = new ArrayCollection();$this->produits = new ArrayCollection();$this->statistiques = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getMarqueCode(): ?string{return $this->code;}public function setMarqueCode(string $code): self{$this->code = $code;return $this;}public function getMarqueLibelle(): ?string{return $this->marque_libelle;}public function setMarqueLibelle(string $marque_libelle): self{$this->marque_libelle = $marque_libelle;return $this;}/*** @return Collection<int, Article>*/public function getArticles(): Collection{return $this->articles;}public function addArticle(Article $article): self{if (!$this->articles->contains($article)) {$this->articles->add($article);$article->setToto($this);}return $this;}public function removeArticle(Article $article): self{if ($this->articles->removeElement($article)) {// set the owning side to null (unless already changed)if ($article->getToto() === $this) {$article->setToto(null);}}return $this;}/*** @return Collection<int, Produit>*/public function getProduits(): Collection{return $this->produits;}public function addProduit(Produit $produit): self{if (!$this->produits->contains($produit)) {$this->produits->add($produit);$produit->setMarque($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->getMarque() === $this) {$produit->setMarque(null);}}return $this;}/*** @return Collection<int, Statistiques>*/public function getStatistiques(): Collection{return $this->statistiques;}public function addStatistique(Statistiques $statistique): self{if (!$this->statistiques->contains($statistique)) {$this->statistiques->add($statistique);$statistique->setMarque($this);}return $this;}public function removeStatistique(Statistiques $statistique): self{if ($this->statistiques->removeElement($statistique)) {// set the owning side to null (unless already changed)if ($statistique->getMarque() === $this) {$statistique->setMarque(null);}}return $this;}}