src/Entity/Messengers.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Embeddable]
  5. final class Messengers
  6. {
  7.     #[ORM\Column(name'messengers_telegram'type'boolean'nullabletrue)]
  8.     protected ?bool $telegram;
  9.     #[ORM\Column(name'messengers_whatsapp'type'integer'nullabletrue)]
  10.     protected ?bool $whatsApp;
  11.     public function __construct(?bool $telegram, ?bool $whatsApp)
  12.     {
  13.         $this->telegram $telegram;
  14.         $this->whatsApp $whatsApp;
  15.     }
  16.     public function hasTelegram(): ?bool
  17.     {
  18.         return $this->telegram;
  19.     }
  20.     public function hasWhatsApp(): ?bool
  21.     {
  22.         return $this->whatsApp;
  23.     }
  24. }