src/Entity/UserAddress.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserAddressRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassUserAddressRepository::class)]
  6. class UserAddress
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length255nullabletrue)]
  13.     private $street;
  14.     #[ORM\Column(type'string'length255nullabletrue)]
  15.     private $city;
  16.     #[ORM\Column(type'string'length255nullabletrue)]
  17.     private $state;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private $postcode;
  20.     #[ORM\Column(type'string'length255nullabletrue)]
  21.     private $country;
  22.     #[ORM\OneToOne(inversedBy'userAddress'targetEntityUser::class, cascade: ['persist''remove'])]
  23.     private $user;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getStreet(): ?string
  29.     {
  30.         return $this->street;
  31.     }
  32.     public function setStreet(?string $street): self
  33.     {
  34.         $this->street $street;
  35.         return $this;
  36.     }
  37.     public function getCity(): ?string
  38.     {
  39.         return $this->city;
  40.     }
  41.     public function setCity(?string $city): self
  42.     {
  43.         $this->city $city;
  44.         return $this;
  45.     }
  46.     public function getState(): ?string
  47.     {
  48.         return $this->state;
  49.     }
  50.     public function setState(?string $state): self
  51.     {
  52.         $this->state $state;
  53.         return $this;
  54.     }
  55.     public function getPostcode(): ?string
  56.     {
  57.         return $this->postcode;
  58.     }
  59.     public function setPostcode(?string $postcode): self
  60.     {
  61.         $this->postcode $postcode;
  62.         return $this;
  63.     }
  64.     public function getCountry(): ?string
  65.     {
  66.         return $this->country;
  67.     }
  68.     public function setCountry(?string $country): self
  69.     {
  70.         $this->country $country;
  71.         return $this;
  72.     }
  73.     public function getUser(): ?User
  74.     {
  75.         return $this->user;
  76.     }
  77.     public function setUser(?User $user): self
  78.     {
  79.         $this->user $user;
  80.         return $this;
  81.     }
  82. }