<?phpnamespace App\Entity;use App\Repository\ProduitTransfererRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ProduitTransfererRepository::class) */class ProduitTransferer{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Produit::class, inversedBy="produitTransferers") */ private $produit; /** * @ORM\Column(type="date") */ private $dateTransfert; /** * @ORM\Column(type="integer") */ private $quantite; /** * @ORM\Column(type="integer") */ private $etat; /** * @ORM\OneToMany(targetEntity=BLProduit::class, mappedBy="produitTransferer") */ private $blProduits; public function __construct() { $this->blProduits = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getProduit(): ?Produit { return $this->produit; } public function setProduit(?Produit $produit): self { $this->produit = $produit; return $this; } public function getDateTransfert(): ?\DateTimeInterface { return $this->dateTransfert; } public function setDateTransfert(\DateTimeInterface $dateTransfert): self { $this->dateTransfert = $dateTransfert; return $this; } public function getQuantite(): ?int { return $this->quantite; } public function setQuantite(int $quantite): self { $this->quantite = $quantite; return $this; } public function getEtat(): ?int { return $this->etat; } public function setEtat(int $etat): self { $this->etat = $etat; return $this; } /** * @return Collection<int, BlProduit> */ public function getBlProduits(): Collection { return $this->blProduits; } public function addBlProduit(BlProduit $blProduit): self { if (!$this->blProduits->contains($blProduit)) { $this->blProduits[] = $blProduit; $blProduit->setProduitTransferer($this); } return $this; } public function removeBlProduit(BLProduit $blProduit): self { if ($this->blProduits->removeElement($blProduit)) { // set the owning side to null (unless already changed) if ($blProduit->getProduitTransferer() === $this) { $blProduit->setProduitTransferer(null); } } return $this; }}