src/Entity/Gos/EmailAttachment.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\EmailAttachmentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=EmailAttachmentRepository::class)
  7.  * @ORM\HasLifecycleCallbacks
  8.  */
  9. class EmailAttachment
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $name;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private $link;
  25.     /**
  26.      * @ORM\Column(type="datetime")
  27.      */
  28.     private $createdAt;
  29.     /**
  30.      * @ORM\Column(type="integer", nullable=true)
  31.      */
  32.     private $emailId;
  33.     /** @ORM\PrePersist() */
  34.     public function prePersist()
  35.     {
  36.         if (empty($this->createdAt))
  37.         {
  38.             $this->createdAt = new \DateTime();
  39.         }
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getName(): ?string
  46.     {
  47.         return $this->name;
  48.     }
  49.     public function setName(string $name): self
  50.     {
  51.         $this->name $name;
  52.         return $this;
  53.     }
  54.     public function getLink(): ?string
  55.     {
  56.         return $this->link;
  57.     }
  58.     public function setLink(string $link): self
  59.     {
  60.         $this->link $link;
  61.         return $this;
  62.     }
  63.     public function getCreatedAt(): ?\DateTimeInterface
  64.     {
  65.         return $this->createdAt;
  66.     }
  67.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  68.     {
  69.         $this->createdAt $createdAt;
  70.         return $this;
  71.     }
  72.     public function getEmailId(): ?int
  73.     {
  74.         return $this->emailId;
  75.     }
  76.     public function setEmailId(?int $emailId): self
  77.     {
  78.         $this->emailId $emailId;
  79.         return $this;
  80.     }
  81. }