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(repositoryClass="App\Repository\AddressRepository")
  10.  */
  11. class Address //extends OrmEntity
  12. {
  13.     /**
  14.      * @var \Ramsey\Uuid\UuidInterface
  15.      *
  16.      * @ORM\Id
  17.      *  @ORM\Column(type="uuid", unique=true)
  18.      * @ORM\GeneratedValue(strategy="CUSTOM")
  19.      * @ORM\CustomIdGenerator(class="Ramsey\Uuid\Doctrine\UuidGenerator")
  20.      * @Groups("Address")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Column(name="AddressDetail", type="string", length=255, nullable=true)
  27.      * @Groups("Address")
  28.      */
  29.     private $addressDetail;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="City", type="string", length=255, nullable=true)
  34.      * @Groups("Address")
  35.      */
  36.     private $city;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(name="Country", type="string", length=255, nullable=true)
  41.      * @Groups("Address")
  42.      */
  43.     private $country;
  44.     /**
  45.      * @var \DateTime
  46.      *
  47.      * @ORM\Column(name="date", type="datetime", nullable=true)
  48.      * @Groups("Address")
  49.      */
  50.     private $date;
  51.     /**
  52.      * Address constructor.
  53.      * @throws \Exception
  54.      */
  55.     public function __construct()
  56.     {
  57.         $this->city='Luanda';
  58.         $this->addressDetail='Luanda';
  59.         $this->country='Angola';
  60.                 //parent::__construct();
  61.     }
  62.     /**
  63.      * Get id
  64.      *
  65.      * @return \Ramsey\Uuid\UuidInterface
  66.      */
  67.     public function getId()
  68.     {
  69.         return $this->id;
  70.     }
  71.     /**
  72.      * Set addressDetail
  73.      *
  74.      * @param string $addressDetail
  75.      *
  76.      * @return Address
  77.      */
  78.     public function setAddressDetail($addressDetail)
  79.     {
  80.         $this->addressDetail $addressDetail;
  81.         return $this;
  82.     }
  83.     /**
  84.      * Get addressDetail
  85.      *
  86.      * @return string
  87.      */
  88.     public function getAddressDetail()
  89.     {
  90.         return $this->addressDetail;
  91.     }
  92.     /**
  93.      * Set city
  94.      *
  95.      * @param string $city
  96.      *
  97.      * @return Address
  98.      */
  99.     public function setCity($city)
  100.     {
  101.         $this->city $city;
  102.         return $this;
  103.     }
  104.     /**
  105.      * Get city
  106.      *
  107.      * @return string
  108.      */
  109.     public function getCity()
  110.     {
  111.         return $this->city;
  112.     }
  113.     /**
  114.      * Set country
  115.      *
  116.      * @param string $country
  117.      *
  118.      * @return Address
  119.      */
  120.     public function setCountry($country)
  121.     {
  122.         $this->country $country;
  123.         return $this;
  124.     }
  125.     /**
  126.      * Get country
  127.      *
  128.      * @return string
  129.      */
  130.     public function getCountry()
  131.     {
  132.         return $this->country;
  133.     }
  134.     /**
  135.      * @return \DateTime
  136.      */
  137.     public function getDate()
  138.     {
  139.         return $this->date;
  140.     }
  141.     /**
  142.      * @param string $date
  143.      */
  144.     public function setDate($date)
  145.     {
  146.         $this->date $date;
  147.     }
  148. }