Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.traiteur-75.fr_1689065491
/
htdocs
/
src
/
Entity
/
/srv/data/trash/vhost_www.traiteur-75.fr_1689065491/htdocs/src/Entity/Address.php
<?php namespace App\Entity; use App\Repository\AddressRepository; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=AddressRepository::class) */ class Address { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $address; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $additional; /** * @ORM\Column(type="string", length=255) */ private $city; /** * @ORM\Column(type="string", length=255) */ private $zipcode; /** * @ORM\Column(type="string", length=255) */ private $country; /** * @ORM\OneToOne(targetEntity=User::class, mappedBy="deliveryAddress", cascade={"persist", "remove"}) */ private $user; public function getId(): ?int { return $this->id; } public function getAddress(): ?string { return $this->address; } public function setAddress(string $address): self { $this->address = $address; return $this; } public function getAdditional(): ?string { return $this->additional; } public function setAdditional(?string $additional): self { $this->additional = $additional; return $this; } public function getCity(): ?string { return $this->city; } public function setCity(string $city): self { $this->city = $city; return $this; } public function getZipcode(): ?string { return $this->zipcode; } public function setZipcode(string $zipcode): self { $this->zipcode = $zipcode; return $this; } public function getCountry(): ?string { return $this->country; } public function setCountry(string $country): self { $this->country = $country; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { // unset the owning side of the relation if necessary if ($user === null && $this->user !== null) { $this->user->setDeliveryAddress(null); } // set the owning side of the relation if necessary if ($user !== null && $user->getDeliveryAddress() !== $this) { $user->setDeliveryAddress($this); } $this->user = $user; return $this; } }