src/Database/Domain/Entity/User/UserNotification.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Database\Domain\Entity\User;
  3. use App\Database\Domain\Entity\AbstractEntity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Security\Core\User\UserInterface;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Database\Domain\Repository\NotificationRepository")
  8.  */
  9. class UserNotification extends AbstractEntity
  10. {
  11.     public const CUSTOM_SUB_ONE_WEEK_END 1;
  12.     public const EMAIL_CRON_INACTIVE_USERS 2;
  13.     public const EMAIL_CRON_EDUCATIONAL 3;
  14.     public const EMAIL_CRON_FINAL 4;
  15.     public const EMAIL_CRON_GET_TOAST_FOR_FREE 5;
  16.     public const EMAIL_CRON_AFTER_SUBSCRIPTION 6;
  17.     public const EMAIL_CRON_PRO_FINISH 7;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity="App\Database\Domain\Entity\User\User", inversedBy="notifications")
  20.      *
  21.      * @ORM\JoinColumn(onDelete="CASCADE")
  22.      */
  23.     private UserInterface $user;
  24.     /**
  25.      * @ORM\Column(type="integer")
  26.      */
  27.     private int $type;
  28.     /**
  29.      * @ORM\Column(type="string", nullable=true)
  30.      */
  31.     private ?string $message;
  32.     public function __construct(string $idint $typeUserInterface $user, ?string $message null)
  33.     {
  34.         $this->id $id;
  35.         $this->type $type;
  36.         $this->message $message;
  37.         $this->user $user;
  38.     }
  39.     public function getType(): int
  40.     {
  41.         return $this->type;
  42.     }
  43.     public function setType(int $type): self
  44.     {
  45.         $this->type $type;
  46.         return $this;
  47.     }
  48.     public function getMessage(): ?string
  49.     {
  50.         return $this->message;
  51.     }
  52.     public function setMessage(?string $message): self
  53.     {
  54.         $this->message $message;
  55.         return $this;
  56.     }
  57. }