src/Entity/Address.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AddressRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassAddressRepository::class)]
  6. class Address
  7. {
  8.     use IdentifiableTrait;
  9.     #[ORM\Column(length255)]
  10.     private ?string $addressLine1 null;
  11.     #[ORM\Column(length255nullabletrue)]
  12.     private ?string $addressLine2 null;
  13.     #[ORM\Column(length10)]
  14.     private ?string $postalCode null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $city null;
  17.     #[ORM\ManyToOne]
  18.     private ?Country $country null;
  19.     #[ORM\Column(nullabletrue)]
  20.     private ?float $latitude null;
  21.     #[ORM\Column(nullabletrue)]
  22.     private ?float $longitude null;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getAddressLine1(): ?string
  28.     {
  29.         return $this->addressLine1;
  30.     }
  31.     public function setAddressLine1(string $addressLine1): static
  32.     {
  33.         $this->addressLine1 $addressLine1;
  34.         return $this;
  35.     }
  36.     public function getAddressLine2(): ?string
  37.     {
  38.         return $this->addressLine2;
  39.     }
  40.     public function setAddressLine2(string $addressLine2): static
  41.     {
  42.         $this->addressLine2 $addressLine2;
  43.         return $this;
  44.     }
  45.     public function getPostalCode(): ?string
  46.     {
  47.         return $this->postalCode;
  48.     }
  49.     public function setPostalCode(string $postalCode): static
  50.     {
  51.         $this->postalCode $postalCode;
  52.         return $this;
  53.     }
  54.     public function getCity(): ?string
  55.     {
  56.         return $this->city;
  57.     }
  58.     public function setCity(string $city): static
  59.     {
  60.         $this->city $city;
  61.         return $this;
  62.     }
  63.     public function getCountry(): ?Country
  64.     {
  65.         return $this->country;
  66.     }
  67.     public function setCountry(?Country $country): static
  68.     {
  69.         $this->country $country;
  70.         return $this;
  71.     }
  72.     public function getLatitude(): ?float
  73.     {
  74.         return $this->latitude;
  75.     }
  76.     public function setLatitude(?float $latitude): static
  77.     {
  78.         $this->latitude $latitude;
  79.         return $this;
  80.     }
  81.     public function getLongitude(): ?float
  82.     {
  83.         return $this->longitude;
  84.     }
  85.     public function setLongitude(?float $longitude): static
  86.     {
  87.         $this->longitude $longitude;
  88.         return $this;
  89.     }
  90. }