src/Entity/CRM/DirectMessage.php line 13
<?phpnamespace App\Entity\CRM;use App\Entity\CRM\Task;use App\Repository\DirectMessageRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: DirectMessageRepository::class)]class DirectMessage{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $dateAdded = null;#[ORM\Column(type: Types::TEXT)]private ?string $title = null;#[ORM\ManyToOne(inversedBy: 'directMessagesSent')]private ?Admin $senderAdmin = null;#[ORM\ManyToOne(inversedBy: 'directMessagesSent')]private ?Consultant $senderConsultant = null;#[ORM\ManyToOne(inversedBy: 'directMessagesReceived')]private ?Admin $receiverAdmin = null;#[ORM\ManyToOne(inversedBy: 'directMessagesReceived')]private ?Consultant $receiverConsultant = null;#[ORM\Column]private ?bool $shown = null;#[ORM\Column]private ?bool $hiddenAtSender = null;#[ORM\Column]private ?bool $hiddenAtRecipient = null;#[ORM\OneToMany(mappedBy: 'directMessage', targetEntity: Task::class)]private Collection $tasks;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $startDate = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $endDate = null;#[ORM\Column(type: Types::TEXT)]private ?string $content = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $receiverNote = null;public function __construct(){$this->tasks = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getDateAdded(): ?\DateTimeInterface{return $this->dateAdded;}public function setDateAdded(\DateTimeInterface $dateAdded): static{$this->dateAdded = $dateAdded;return $this;}public function getTitle(): ?string{return $this->title;}public function setTitle(string $title): static{$this->title = $title;return $this;}public function getSenderAdmin(): ?Admin{return $this->senderAdmin;}public function setSenderAdmin(?Admin $senderAdmin): static{$this->senderAdmin = $senderAdmin;return $this;}public function getSenderConsultant(): ?Consultant{return $this->senderConsultant;}public function setSenderConsultant(?Consultant $senderConsultant): static{$this->senderConsultant = $senderConsultant;return $this;}public function getReceiverAdmin(): ?Admin{return $this->receiverAdmin;}public function setReceiverAdmin(?Admin $receiverAdmin): static{$this->receiverAdmin = $receiverAdmin;return $this;}public function getReceiverConsultant(): ?Consultant{return $this->receiverConsultant;}public function setReceiverConsultant(?Consultant $receiverConsultant): static{$this->receiverConsultant = $receiverConsultant;return $this;}public function isShown(): ?bool{return $this->shown;}public function setShown(bool $shown): static{$this->shown = $shown;return $this;}public function isHiddenAtSender(): ?bool{return $this->hiddenAtSender;}public function setHiddenAtSender(bool $hiddenAtSender): static{$this->hiddenAtSender = $hiddenAtSender;return $this;}public function isHiddenAtRecipient(): ?bool{return $this->hiddenAtRecipient;}public function setHiddenAtRecipient(bool $hiddenAtRecipient): static{$this->hiddenAtRecipient = $hiddenAtRecipient;return $this;}/*** @return Collection<int, Task>*/public function getTasks(): Collection{return $this->tasks;}public function addTask(Task $task): static{if (!$this->tasks->contains($task)) {$this->tasks->add($task);$task->setDirectMessage($this);}return $this;}public function removeTask(Task $task): static{if ($this->tasks->removeElement($task)) {// set the owning side to null (unless already changed)if ($task->getDirectMessage() === $this) {$task->setDirectMessage(null);}}return $this;}public function getStartDate(): ?\DateTimeInterface{return $this->startDate;}public function setStartDate(?\DateTimeInterface $startDate): static{$this->startDate = $startDate;return $this;}public function getEndDate(): ?\DateTimeInterface{return $this->endDate;}public function setEndDate(\DateTimeInterface $endDate): static{$this->endDate = $endDate;return $this;}public function getContent(): ?string{return $this->content;}public function setContent(string $content): static{$this->content = $content;return $this;}public function getReceiverNote(): ?string{return $this->receiverNote;}public function setReceiverNote(?string $receiverNote): static{$this->receiverNote = $receiverNote;return $this;}}