src/Entity/Address.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AddressRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassAddressRepository::class)]
  7. class Address
  8. {
  9.     public const TYPE_NONE 'none';
  10.     public const TYPE_DELIVERY 'delivery';
  11.     public const TYPE_BILLING 'billing';
  12.     public const BOTH 'both';
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $city null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $postCode null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $address null;
  23.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  24.     private ?string $complement null;
  25.     #[ORM\Column(length255)]
  26.     private ?string $type Address::TYPE_NONE;
  27.     #[ORM\Column(length255)]
  28.     private ?string $label null;
  29.     #[ORM\ManyToOne(inversedBy'addresses')]
  30.     #[ORM\JoinColumn(nullablefalse)]
  31.     private ?User $user null;
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getCity(): ?string
  37.     {
  38.         return $this->city;
  39.     }
  40.     public function setCity(string $city): self
  41.     {
  42.         $this->city $city;
  43.         return $this;
  44.     }
  45.     public function getPostCode(): ?string
  46.     {
  47.         return $this->postCode;
  48.     }
  49.     public function setPostCode(string $postCode): self
  50.     {
  51.         $this->postCode $postCode;
  52.         return $this;
  53.     }
  54.     public function getAddress(): ?string
  55.     {
  56.         return $this->address;
  57.     }
  58.     public function setAddress(string $address): self
  59.     {
  60.         $this->address $address;
  61.         return $this;
  62.     }
  63.     public function getComplement(): ?string
  64.     {
  65.         return $this->complement;
  66.     }
  67.     public function setComplement(?string $complement): self
  68.     {
  69.         $this->complement $complement;
  70.         return $this;
  71.     }
  72.     public function getType(): ?string
  73.     {
  74.         return $this->type;
  75.     }
  76.     public function setType(string $type): self
  77.     {
  78.         $this->type $type;
  79.         return $this;
  80.     }
  81.     public function getLabel(): ?string
  82.     {
  83.         return $this->label;
  84.     }
  85.     public function setLabel(string $label): self
  86.     {
  87.         $this->label $label;
  88.         return $this;
  89.     }
  90.     public function getUser(): ?User
  91.     {
  92.         return $this->user;
  93.     }
  94.     public function setUser(?User $user): self
  95.     {
  96.         $this->user $user;
  97.         return $this;
  98.     }
  99. }