src/Entity/CRM/NotificationToSendSetting.php line 12

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\NotificationToSendSettingRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassNotificationToSendSettingRepository::class)]
  9. class NotificationToSendSetting
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column]
  16.     private ?int $type null;
  17.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  18.     private ?string $description null;
  19.     #[ORM\Column]
  20.     private ?bool $isActive null;
  21.     #[ORM\ManyToMany(targetEntityAdmin::class, inversedBy'notificationToSendSettings')]
  22.     private Collection $admin;
  23.     public function __construct()
  24.     {
  25.         $this->admin = new ArrayCollection();
  26.     }
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getType(): ?int
  32.     {
  33.         return $this->type;
  34.     }
  35.     public function setType(int $type): static
  36.     {
  37.         $this->type $type;
  38.         return $this;
  39.     }
  40.     /**
  41.      * @return Collection<int, Admin>
  42.      */
  43.     public function getAdmin(): Collection
  44.     {
  45.         return $this->admin;
  46.     }
  47.     public function getDescription(): ?string
  48.     {
  49.         return $this->description;
  50.     }
  51.     public function setDescription(?string $description): static
  52.     {
  53.         $this->description $description;
  54.         return $this;
  55.     }
  56.     public function isIsActive(): ?bool
  57.     {
  58.         return $this->isActive;
  59.     }
  60.     public function setIsActive(bool $isActive): static
  61.     {
  62.         $this->isActive $isActive;
  63.         return $this;
  64.     }
  65.     public function addAdmin(Admin $admin): static
  66.     {
  67.         if (!$this->admin->contains($admin)) {
  68.             $this->admin->add($admin);
  69.         }
  70.         return $this;
  71.     }
  72.     public function removeAdmin(Admin $admin): static
  73.     {
  74.         $this->admin->removeElement($admin);
  75.         return $this;
  76.     }
  77. }