<?php
namespace App\Entity;
use App\Repository\PlatinesRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PlatinesRepository::class)]
class Platines
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $reference = null;
#[ORM\ManyToMany(targetEntity: Gestionmachines::class, mappedBy: 'platines')]
private Collection $gestionmachines;
#[ORM\ManyToOne(inversedBy: 'platines')]
private ?Fournisseur $fournisseur = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $quantity = null;
public function __construct()
{
$this->gestionmachines = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
/**
* @return Collection<int, Gestionmachines>
*/
public function getGestionmachines(): Collection
{
return $this->gestionmachines;
}
public function addGestionmachine(Gestionmachines $gestionmachine): self
{
if (!$this->gestionmachines->contains($gestionmachine)) {
$this->gestionmachines->add($gestionmachine);
$gestionmachine->addPlatine($this);
}
return $this;
}
public function removeGestionmachine(Gestionmachines $gestionmachine): self
{
if ($this->gestionmachines->removeElement($gestionmachine)) {
$gestionmachine->removePlatine($this);
}
return $this;
}
public function getFournisseur(): ?Fournisseur
{
return $this->fournisseur;
}
public function setFournisseur(?Fournisseur $fournisseur): self
{
$this->fournisseur = $fournisseur;
return $this;
}
public function getQuantity(): ?string
{
return $this->quantity;
}
public function setQuantity(?string $quantity): self
{
$this->quantity = $quantity;
return $this;
}
}