src/Entity/DeliveryAddress.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DeliveryAddressRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=DeliveryAddressRepository::class)
  7.  */
  8. class DeliveryAddress
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     private $prenom;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $nom;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $adresse;
  28.     /**
  29.      * @ORM\Column(type="string", length=255)
  30.      */
  31.     private $codePostal;
  32.     /**
  33.      * @ORM\Column(type="string", length=255)
  34.      */
  35.     private $ville;
  36.     /**
  37.      * @ORM\Column(type="string", length=255)
  38.      */
  39.     private $pays;
  40.     /**
  41.      * @ORM\OneToOne(targetEntity=Code::class, mappedBy="deliveryAddress", cascade={"persist", "remove"})
  42.      */
  43.     private $code;
  44.     private $useAdresseFacturation;
  45.     public function getId(): ?int
  46.     {
  47.         return $this->id;
  48.     }
  49.     public function getPrenom(): ?string
  50.     {
  51.         return $this->prenom;
  52.     }
  53.     public function setPrenom(string $prenom): self
  54.     {
  55.         $this->prenom $prenom;
  56.         return $this;
  57.     }
  58.     public function getNom(): ?string
  59.     {
  60.         return $this->nom;
  61.     }
  62.     public function setNom(string $nom): self
  63.     {
  64.         $this->nom $nom;
  65.         return $this;
  66.     }
  67.     public function getAdresse(): ?string
  68.     {
  69.         return $this->adresse;
  70.     }
  71.     public function setAdresse(string $adresse): self
  72.     {
  73.         $this->adresse $adresse;
  74.         return $this;
  75.     }
  76.     public function getCodePostal(): ?string
  77.     {
  78.         return $this->codePostal;
  79.     }
  80.     public function setCodePostal(string $codePostal): self
  81.     {
  82.         $this->codePostal $codePostal;
  83.         return $this;
  84.     }
  85.     public function getVille(): ?string
  86.     {
  87.         return $this->ville;
  88.     }
  89.     public function setVille(string $ville): self
  90.     {
  91.         $this->ville $ville;
  92.         return $this;
  93.     }
  94.     public function getPays(): ?string
  95.     {
  96.         return $this->pays;
  97.     }
  98.     public function setPays(string $pays): self
  99.     {
  100.         $this->pays $pays;
  101.         return $this;
  102.     }
  103.     public function getCode(): ?Code
  104.     {
  105.         return $this->code;
  106.     }
  107.     public function setCode(?Code $code): self
  108.     {
  109.         // unset the owning side of the relation if necessary
  110.         if ($code === null && $this->code !== null) {
  111.             $this->code->setDeliveryAddress(null);
  112.         }
  113.         // set the owning side of the relation if necessary
  114.         if ($code !== null && $code->getDeliveryAddress() !== $this) {
  115.             $code->setDeliveryAddress($this);
  116.         }
  117.         $this->code $code;
  118.         return $this;
  119.     }
  120.     public function getUseAdresseFacturation(): ?bool
  121.     {
  122.         return $this->useAdresseFacturation;
  123.     }
  124.     public function setUseAdresseFacturation(bool $useAdresseFacturation): self
  125.     {
  126.         $this->useAdresseFacturation $useAdresseFacturation;
  127.         return $this;
  128.     }
  129. }