<?phpnamespace App\Entity;use App\Repository\TransferRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;use Gedmo\Timestampable\Traits\TimestampableEntity;#[ORM\Entity(repositoryClass: TransferRepository::class)]class Transfer extends Product{ #[ORM\Column(length: 255)] private ?string $name = null; #[ORM\Column] private ?bool $active = true; #[ORM\OneToMany(mappedBy: 'transfer', targetEntity: TransferAmenityPrice::class, orphanRemoval: true)] private Collection $transferAmenityPrices; #[ORM\OneToMany(mappedBy: 'transfer', targetEntity: VehiculeType::class, orphanRemoval: true)] private Collection $vehicules; #[ORM\ManyToOne] #[ORM\JoinColumn(nullable: false)] private ?Country $country = null; public function __construct() { parent::__construct(); $this->transferAmenityPrices = new ArrayCollection(); $this->vehicules = new ArrayCollection(); } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } public function isActive(): ?bool { return $this->active; } /** * @return bool|null */ public function getActive(): ?bool { return $this->active; } public function setActive(bool $active): static { $this->active = $active; return $this; } /** * @return Collection<int, TransferAmenityPrice> */ public function getTransferAmenityPrices(): Collection { return $this->transferAmenityPrices; } public function addTransferAmenityPrice(TransferAmenityPrice $transferAmenityPrice): static { if (!$this->transferAmenityPrices->contains($transferAmenityPrice)) { $this->transferAmenityPrices->add($transferAmenityPrice); $transferAmenityPrice->setTransfer($this); } return $this; } public function removeTransferAmenityPrice(TransferAmenityPrice $transferAmenityPrice): static { if ($this->transferAmenityPrices->removeElement($transferAmenityPrice)) { // set the owning side to null (unless already changed) if ($transferAmenityPrice->getTransfer() === $this) { $transferAmenityPrice->setTransfer(null); } } return $this; } public function __toString(): string { return $this->name; } /** * @return Collection<int, VehiculeType> */ public function getVehicules(): Collection { return $this->vehicules; } public function addVehicule(VehiculeType $vehicule): static { if (!$this->vehicules->contains($vehicule)) { $this->vehicules->add($vehicule); $vehicule->setTransfer($this); } return $this; } public function removeVehicule(VehiculeType $vehicule): static { if ($this->vehicules->removeElement($vehicule)) { // set the owning side to null (unless already changed) if ($vehicule->getTransfer() === $this) { $vehicule->setTransfer(null); } } return $this; } public function getCountry(): ?Country { return $this->country; } public function setCountry(?Country $country): static { $this->country = $country; return $this; }}