src/Entity/CRM/Notification.php line 13
<?phpnamespace App\Entity\CRM;use App\Repository\NotificationRepository;use DateTime;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: NotificationRepository::class)]class Notification{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: Types::TEXT)]private ?string $title = null;#[ORM\ManyToMany(targetEntity: Admin::class, inversedBy: 'notifications')]private Collection $admin;#[ORM\Column(type: Types::DATETIME_MUTABLE)]private ?\DateTimeInterface $date;#[ORM\Column]private ?bool $showed = false;#[ORM\ManyToMany(targetEntity: Consultant::class, inversedBy: 'notifications')]private Collection $consultant;#[ORM\ManyToOne(inversedBy: 'notifications')]private ?Branch $branch = null;#[ORM\Column(nullable: true)]private ?array $icons = [];public function __construct(){$this->admin = new ArrayCollection();$this->date = new DateTime();$this->consultant = new ArrayCollection();$this->icons = null;}public function getId(): ?int{return $this->id;}public function getTitle(): ?string{return $this->title;}public function setTitle(string $title): static{$this->title = $title;return $this;}/*** @return Collection<int, Admin>*/public function getAdmin(): Collection{return $this->admin;}public function addAdmin(Admin $admin): static{if (!$this->admin->contains($admin)) {$this->admin->add($admin);}return $this;}public function removeAdmin(Admin $admin): static{$this->admin->removeElement($admin);return $this;}public function getDate(): ?\DateTimeInterface{return $this->date;}public function setDate(\DateTimeInterface $date): static{$this->date = $date;return $this;}public function isShowed(): ?bool{return $this->showed;}public function setShowed(bool $showed): static{$this->showed = $showed;return $this;}/*** @return Collection<int, consultant>*/public function getConsultant(): Collection{return $this->consultant;}public function addConsultant(consultant $consultant): static{if (!$this->consultant->contains($consultant)) {$this->consultant->add($consultant);}return $this;}public function removeConsultant(consultant $consultant): static{$this->consultant->removeElement($consultant);return $this;}public function getBranch(): ?Branch{return $this->branch;}public function setBranch(?Branch $branch): static{$this->branch = $branch;return $this;}public function getIcons(): ?array{return $this->icons;}public function setIcons(?array $icons): static{$this->icons = $icons;return $this;}public function addIcon(int $icon): static{$this->icons[]= $icon;return $this;}}