<?phpnamespace App\Entity;use App\Repository\EmailInfoRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=EmailInfoRepository::class) */class EmailInfo{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $title; /** * @ORM\Column(type="string", length=255) */ private $subject; /** * @ORM\Column(type="string", length=255) */ private $template; /** * @ORM\Column(type="string", length=255) */ private $entity; /** * @ORM\Column(type="json", nullable=true) */ private $defaultReceivers = []; /** * @ORM\ManyToMany(targetEntity=Media::class, inversedBy="emailInfos") */ private $attachments; /** * @ORM\OneToOne(targetEntity=InteractionTemplate::class, inversedBy="emailInfo", cascade={"persist", "remove"}) */ private $interactionTemplate; public function __construct() { $this->attachments = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): self { $this->title = $title; return $this; } public function getSubject(): ?string { return $this->subject; } public function setSubject(string $subject): self { $this->subject = $subject; return $this; } public function getTemplate(): ?string { return $this->template; } public function setTemplate(string $template): self { $this->template = $template; return $this; } public function getEntity(): ?string { return $this->entity; } public function setEntity(string $entity): self { $this->entity = $entity; return $this; } public function getDefaultReceivers(): ?array { return $this->defaultReceivers; } public function setDefaultReceivers(?array $defaultReceivers): self { $this->defaultReceivers = $defaultReceivers; return $this; } /** * @return Collection|Media[] */ public function getAttachments(): Collection { return $this->attachments; } public function addAttachment(Media $attachment): self { if (!$this->attachments->contains($attachment)) { $this->attachments[] = $attachment; } return $this; } public function removeAttachment(Media $attachment): self { $this->attachments->removeElement($attachment); return $this; } public function getInteractionTemplate(): ?InteractionTemplate { return $this->interactionTemplate; } public function setInteractionTemplate(?InteractionTemplate $interactionTemplate): self { $this->interactionTemplate = $interactionTemplate; return $this; }}