<?php
namespace App\Entity;
use App\Repository\MailingCommunicationRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MailingCommunicationRepository::class)]
class MailingCommunication
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'json', nullable: true)]
private $filters = [];
#[ORM\Column(type: 'json', nullable: true)]
private $idsAccountingFirmSelected = [];
#[ORM\Column(type: 'json', nullable: true)]
private $idsAccountingFirmUnselected = [];
#[ORM\Column(type: 'datetime', nullable: true)]
private $sendDate;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $status;
#[ORM\Column(type: 'text', nullable: true)]
private $objectMail;
#[ORM\OneToMany(mappedBy: 'mailingCommunication', targetEntity: MailingTask::class)]
private $mailingTasks;
#[ORM\Column(type: 'json', nullable: true)]
private $mjmlStructure = [];
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $campaignName;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $mailjetId;
#[ORM\Column(type: 'string', length: 255)]
private $category;
public function __construct()
{
$this->mailingTasks = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getFilters(): ?array
{
return $this->filters;
}
public function setFilters(array $filters): self
{
$this->filters = $filters;
return $this;
}
public function getIdsAccountingFirmSelected(): ?array
{
return $this->idsAccountingFirmSelected;
}
public function setIdsAccountingFirmSelected(array $idsAccountingFirmSelected): self
{
$this->idsAccountingFirmSelected = $idsAccountingFirmSelected;
return $this;
}
public function getIdsAccountingFirmUnselected(): ?array
{
return $this->idsAccountingFirmUnselected;
}
public function setIdsAccountingFirmUnselected(array $idsAccountingFirmUnselected): self
{
$this->idsAccountingFirmUnselected = $idsAccountingFirmUnselected;
return $this;
}
public function getSendDate(): ?\DateTimeInterface
{
return $this->sendDate;
}
public function setSendDate(\DateTimeInterface $sendDate): self
{
$this->sendDate = $sendDate;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
public function getObjectMail(): ?string
{
return $this->objectMail;
}
public function setObjectMail(string $objectMail): self
{
$this->objectMail = $objectMail;
return $this;
}
/**
* @return Collection<int, MailingTask>
*/
public function getMailingTasks(): Collection
{
return $this->mailingTasks;
}
public function addMailingTask(MailingTask $mailingTask): self
{
if (!$this->mailingTasks->contains($mailingTask)) {
$this->mailingTasks[] = $mailingTask;
$mailingTask->setMailingCommunication($this);
}
return $this;
}
public function removeMailingTask(MailingTask $mailingTask): self
{
if ($this->mailingTasks->removeElement($mailingTask)) {
// set the owning side to null (unless already changed)
if ($mailingTask->getMailingCommunication() === $this) {
$mailingTask->setMailingCommunication(null);
}
}
return $this;
}
public function getmjmlStructure(): ?array
{
return $this->mjmlStructure;
}
public function setmjmlStructure(array $mjmlStructure): self
{
$this->mjmlStructure = $mjmlStructure;
return $this;
}
public function getCampaignName(): ?string
{
return $this->campaignName;
}
public function setCampaignName(string $campaignName): self
{
$this->campaignName = $campaignName;
return $this;
}
public function getMailjetId(): ?string
{
return $this->mailjetId;
}
public function setMailjetId(?string $mailjetId): self
{
$this->mailjetId = $mailjetId;
return $this;
}
public function getCategory(): ?string
{
return $this->category;
}
public function setCategory(string $category): self
{
$this->category = $category;
return $this;
}
}