src/Entity/Platines.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PlatinesRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassPlatinesRepository::class)]
  8. class Platines
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255nullabletrue)]
  15.     private ?string $reference null;
  16.     #[ORM\ManyToMany(targetEntityGestionmachines::class, mappedBy'platines')]
  17.     private Collection $gestionmachines;
  18.     #[ORM\ManyToOne(inversedBy'platines')]
  19.     private ?Fournisseur $fournisseur null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $quantity null;
  22.     public function __construct()
  23.     {
  24.         $this->gestionmachines = new ArrayCollection();
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getReference(): ?string
  31.     {
  32.         return $this->reference;
  33.     }
  34.     public function setReference(?string $reference): self
  35.     {
  36.         $this->reference $reference;
  37.         return $this;
  38.     }
  39.     /**
  40.      * @return Collection<int, Gestionmachines>
  41.      */
  42.     public function getGestionmachines(): Collection
  43.     {
  44.         return $this->gestionmachines;
  45.     }
  46.     public function addGestionmachine(Gestionmachines $gestionmachine): self
  47.     {
  48.         if (!$this->gestionmachines->contains($gestionmachine)) {
  49.             $this->gestionmachines->add($gestionmachine);
  50.             $gestionmachine->addPlatine($this);
  51.         }
  52.         return $this;
  53.     }
  54.     public function removeGestionmachine(Gestionmachines $gestionmachine): self
  55.     {
  56.         if ($this->gestionmachines->removeElement($gestionmachine)) {
  57.             $gestionmachine->removePlatine($this);
  58.         }
  59.         return $this;
  60.     }
  61.     public function getFournisseur(): ?Fournisseur
  62.     {
  63.         return $this->fournisseur;
  64.     }
  65.     public function setFournisseur(?Fournisseur $fournisseur): self
  66.     {
  67.         $this->fournisseur $fournisseur;
  68.         return $this;
  69.     }
  70.     public function getQuantity(): ?string
  71.     {
  72.         return $this->quantity;
  73.     }
  74.     public function setQuantity(?string $quantity): self
  75.     {
  76.         $this->quantity $quantity;
  77.         return $this;
  78.     }
  79. }