<?phpnamespace App\Entity;use App\Repository\DeliveryAddressRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=DeliveryAddressRepository::class) */class DeliveryAddress{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $prenom; /** * @ORM\Column(type="string", length=255) */ private $nom; /** * @ORM\Column(type="string", length=255) */ private $adresse; /** * @ORM\Column(type="string", length=255) */ private $codePostal; /** * @ORM\Column(type="string", length=255) */ private $ville; /** * @ORM\Column(type="string", length=255) */ private $pays; /** * @ORM\OneToOne(targetEntity=Code::class, mappedBy="deliveryAddress", cascade={"persist", "remove"}) */ private $code; private $useAdresseFacturation; public function getId(): ?int { return $this->id; } public function getPrenom(): ?string { return $this->prenom; } public function setPrenom(string $prenom): self { $this->prenom = $prenom; return $this; } public function getNom(): ?string { return $this->nom; } public function setNom(string $nom): self { $this->nom = $nom; return $this; } public function getAdresse(): ?string { return $this->adresse; } public function setAdresse(string $adresse): self { $this->adresse = $adresse; return $this; } public function getCodePostal(): ?string { return $this->codePostal; } public function setCodePostal(string $codePostal): self { $this->codePostal = $codePostal; return $this; } public function getVille(): ?string { return $this->ville; } public function setVille(string $ville): self { $this->ville = $ville; return $this; } public function getPays(): ?string { return $this->pays; } public function setPays(string $pays): self { $this->pays = $pays; return $this; } public function getCode(): ?Code { return $this->code; } public function setCode(?Code $code): self { // unset the owning side of the relation if necessary if ($code === null && $this->code !== null) { $this->code->setDeliveryAddress(null); } // set the owning side of the relation if necessary if ($code !== null && $code->getDeliveryAddress() !== $this) { $code->setDeliveryAddress($this); } $this->code = $code; return $this; } public function getUseAdresseFacturation(): ?bool { return $this->useAdresseFacturation; } public function setUseAdresseFacturation(bool $useAdresseFacturation): self { $this->useAdresseFacturation = $useAdresseFacturation; return $this; }}