src/Entity/Fournisseur.php line 11
<?phpnamespace App\Entity;use App\Repository\FournisseurRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: FournisseurRepository::class)]class Fournisseur{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column(length: 50, nullable: true)]private ?string $phone = null;#[ORM\OneToMany(mappedBy: 'fournisseur', targetEntity: EntreStock::class)]private Collection $entreStocks;public function __construct(){$this->entreStocks = 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 getPhone(): ?string{return $this->phone;}public function setPhone(?string $phone): self{$this->phone = $phone;return $this;}/*** @return Collection<int, EntreStock>*/public function getEntreStocks(): Collection{return $this->entreStocks;}public function addEntreStock(EntreStock $entreStock): self{if (!$this->entreStocks->contains($entreStock)) {$this->entreStocks->add($entreStock);$entreStock->setFournisseur($this);}return $this;}public function removeEntreStock(EntreStock $entreStock): self{if ($this->entreStocks->removeElement($entreStock)) {// set the owning side to null (unless already changed)if ($entreStock->getFournisseur() === $this) {$entreStock->setFournisseur(null);}}return $this;}}