src/Entity/InvoiceData.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\IdTrait;
  4. use App\Entity\Traits\TimeStampAbleTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Repository\InvoiceDataRepository;
  7. /**
  8.  * @ORM\Entity(repositoryClass=InvoiceDataRepository::class)
  9.  * @ORM\HasLifecycleCallbacks
  10.  */
  11. class InvoiceData
  12. {
  13.     use IdTrait;
  14.     use TimeStampAbleTrait;
  15.     /**
  16.      * @ORM\Column (type="string", length=255, nullable=true)
  17.      */
  18.     private ?string $vatId = null;
  19.     /**
  20.      * @ORM\Column (type="string", length=255, nullable=true)
  21.      */
  22.     private ?string $name = null;
  23.     /**
  24.      * @ORM\Column (type="string", length=255, nullable=true)
  25.      */
  26.     private ?string $email = null;
  27.     /**
  28.      * @ORM\ManyToOne (targetEntity=Address::class)
  29.      */
  30.     private ?Address $address;
  31.     public function __clone()
  32.     {
  33.         $this->id = null;
  34.         $this->address = null;
  35.     }
  36.     public function cloneObject(?Address $address): self
  37.     {
  38.         $clone = clone $this;
  39.         $clone->address = $address;
  40.         return $clone;
  41.     }
  42.     /**
  43.      * @return string|null
  44.      */
  45.     public function getVatId(): ?string
  46.     {
  47.         return $this->vatId;
  48.     }
  49.     /**
  50.      * @param string|null $vatId
  51.      */
  52.     public function setVatId(?string $vatId): self
  53.     {
  54.         $this->vatId = $vatId;
  55.         return $this;
  56.     }
  57.     /**
  58.      * @return string|null
  59.      */
  60.     public function getName(): ?string
  61.     {
  62.         return $this->name;
  63.     }
  64.     /**
  65.      * @param string|null $name
  66.      */
  67.     public function setName(?string $name): self
  68.     {
  69.         $this->name = $name;
  70.         return $this;
  71.     }
  72.     /**
  73.      * @return string|null
  74.      */
  75.     public function getEmail(): ?string
  76.     {
  77.         return $this->email;
  78.     }
  79.     /**
  80.      * @param string|null $email
  81.      */
  82.     public function setEmail(?string $email): self
  83.     {
  84.         $this->email = $email;
  85.         return $this;
  86.     }
  87.     /**
  88.      * @return Address|null
  89.      */
  90.     public function getAddress(): ?Address
  91.     {
  92.         return $this->address;
  93.     }
  94.     /**
  95.      * @param Address|null $address
  96.      */
  97.     public function setAddress(?Address $address): self
  98.     {
  99.         $this->address = $address;
  100.         return $this;
  101.     }
  102. }