<?phpnamespace App\Entity;use App\Repository\QuantiteBouteilleRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=QuantiteBouteilleRepository::class) */class QuantiteBouteille{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="integer") */ private $minBouteille; /** * @ORM\Column(type="integer") */ private $maxBouteille; /** * @ORM\Column(type="integer") */ private $nbCartons; /** * @ORM\ManyToOne(targetEntity=Zone::class, inversedBy="quantitesBouteilles") */ private $zone; /** * @ORM\OneToMany(targetEntity=Tarif::class, mappedBy="quantiteBouteille") */ private $tarifs; /** * @ORM\Column(type="integer", nullable=true) */ private $ordre; public function __construct() { $this->tarifs = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getMinBouteille(): ?int { return $this->minBouteille; } public function setMinBouteille(int $minBouteille): self { $this->minBouteille = $minBouteille; return $this; } public function getMaxBouteille(): ?int { return $this->maxBouteille; } public function setMaxBouteille(int $maxBouteille): self { $this->maxBouteille = $maxBouteille; return $this; } public function getNbCartons(): ?int { return $this->nbCartons; } public function setNbCartons(int $nbCartons): self { $this->nbCartons = $nbCartons; return $this; } public function getZone(): ?Zone { return $this->zone; } public function setZone(?Zone $zone): self { $this->zone = $zone; return $this; } /** * @return Collection<int, Tarif> */ public function getTarifs(): Collection { return $this->tarifs; } public function addTarif(Tarif $tarif): self { if (!$this->tarifs->contains($tarif)) { $this->tarifs[] = $tarif; $tarif->setQuantiteBouteille($this); } return $this; } public function removeTarif(Tarif $tarif): self { if ($this->tarifs->removeElement($tarif)) { // set the owning side to null (unless already changed) if ($tarif->getQuantiteBouteille() === $this) { $tarif->setQuantiteBouteille(null); } } return $this; } public function getOrdre(): ?int { return $this->ordre; } public function setOrdre(int $ordre): self { $this->ordre = $ordre; return $this; } }