src/Entity/ProduitTransferer.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProduitTransfererRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ProduitTransfererRepository::class)
  9.  */
  10. class ProduitTransferer
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Produit::class, inversedBy="produitTransferers")
  20.      */
  21.     private $produit;
  22.     /**
  23.      * @ORM\Column(type="date")
  24.      */
  25.     private $dateTransfert;
  26.     /**
  27.      * @ORM\Column(type="integer")
  28.      */
  29.     private $quantite;
  30.     /**
  31.      * @ORM\Column(type="integer")
  32.      */
  33.     private $etat;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=BLProduit::class, mappedBy="produitTransferer")
  36.      */
  37.     private $blProduits;
  38.     public function __construct()
  39.     {
  40.         $this->blProduits = new ArrayCollection();
  41.     }
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getProduit(): ?Produit
  47.     {
  48.         return $this->produit;
  49.     }
  50.     public function setProduit(?Produit $produit): self
  51.     {
  52.         $this->produit $produit;
  53.         return $this;
  54.     }
  55.     public function getDateTransfert(): ?\DateTimeInterface
  56.     {
  57.         return $this->dateTransfert;
  58.     }
  59.     public function setDateTransfert(\DateTimeInterface $dateTransfert): self
  60.     {
  61.         $this->dateTransfert $dateTransfert;
  62.         return $this;
  63.     }
  64.     public function getQuantite(): ?int
  65.     {
  66.         return $this->quantite;
  67.     }
  68.     public function setQuantite(int $quantite): self
  69.     {
  70.         $this->quantite $quantite;
  71.         return $this;
  72.     }
  73.     public function getEtat(): ?int
  74.     {
  75.         return $this->etat;
  76.     }
  77.     public function setEtat(int $etat): self
  78.     {
  79.         $this->etat $etat;
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return Collection<int, BlProduit>
  84.      */
  85.     public function getBlProduits(): Collection
  86.     {
  87.         return $this->blProduits;
  88.     }
  89.     public function addBlProduit(BlProduit $blProduit): self
  90.     {
  91.         if (!$this->blProduits->contains($blProduit)) {
  92.             $this->blProduits[] = $blProduit;
  93.             $blProduit->setProduitTransferer($this);
  94.         }
  95.         return $this;
  96.     }
  97.     public function removeBlProduit(BLProduit $blProduit): self
  98.     {
  99.         if ($this->blProduits->removeElement($blProduit)) {
  100.             // set the owning side to null (unless already changed)
  101.             if ($blProduit->getProduitTransferer() === $this) {
  102.                 $blProduit->setProduitTransferer(null);
  103.             }
  104.         }
  105.         return $this;
  106.     }
  107. }