src/Entity/Address.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Serializer\Annotation\Groups;
  5. /**
  6.  * Address
  7.  *
  8.  * @ORM\Table(name="address")
  9.  * @ORM\Entity
  10.  */
  11. class Address
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer", nullable=false)
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @Groups("rdv")
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="name", type="string", length=255, nullable=false)
  26.      */
  27.     private $name;
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(name="street", type="string", length=500, nullable=false)
  32.      */
  33.     private $street;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="zipcode", type="string", length=255, nullable=false)
  38.      */
  39.     private $zipcode;
  40.     /**
  41.      * @var string
  42.      *
  43.      * @ORM\Column(name="city", type="string", length=255, nullable=false)
  44.      */
  45.     private $city;
  46.     public function __toString(): string
  47.     {
  48.         return $this->name;
  49.     }
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getName(): ?string
  55.     {
  56.         return $this->name;
  57.     }
  58.     public function setName(string $name): self
  59.     {
  60.         $this->name $name;
  61.         return $this;
  62.     }
  63.     public function getStreet(): ?string
  64.     {
  65.         return $this->street;
  66.     }
  67.     public function setStreet(string $street): self
  68.     {
  69.         $this->street $street;
  70.         return $this;
  71.     }
  72.     public function getZipcode(): ?string
  73.     {
  74.         return $this->zipcode;
  75.     }
  76.     public function setZipcode(string $zipcode): self
  77.     {
  78.         $this->zipcode $zipcode;
  79.         return $this;
  80.     }
  81.     public function getCity(): ?string
  82.     {
  83.         return $this->city;
  84.     }
  85.     public function setCity(string $city): self
  86.     {
  87.         $this->city $city;
  88.         return $this;
  89.     }
  90. }