<?phpnamespace App\Entity\Gos;use App\Repository\EmailAttachmentRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=EmailAttachmentRepository::class) * @ORM\HasLifecycleCallbacks */class EmailAttachment{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\Column(type="string", length=255) */ private $link; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="integer", nullable=true) */ private $emailId; /** @ORM\PrePersist() */ public function prePersist() { if (empty($this->createdAt)) { $this->createdAt = new \DateTime(); } } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getLink(): ?string { return $this->link; } public function setLink(string $link): self { $this->link = $link; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getEmailId(): ?int { return $this->emailId; } public function setEmailId(?int $emailId): self { $this->emailId = $emailId; return $this; }}