src/Entity/AppAccountNotification.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppAccountNotificationRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassAppAccountNotificationRepository::class)]
  7. #[ORM\Table(name'TB_ACCOUNTS_NOTIFICATIONS')]
  8. #[ORM\HasLifecycleCallbacks]
  9. class AppAccountNotification
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne(inversedBy'appAccountNotifications')]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?AppAccount $appAccount null;
  18.     #[ORM\ManyToOne(inversedBy'appAccountNotifications')]
  19.     #[ORM\JoinColumn(nullablefalse)]
  20.     private ?Notification $notification null;
  21.     #[ORM\Column(nullabletrue)]
  22.     private ?bool $seen null;
  23.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  24.     private ?\DateTimeInterface $seenAt null;
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  26.     private ?\DateTimeInterface $createdAt null;
  27.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  28.     private ?\DateTimeInterface $modifiedAt null;
  29.     #[ORM\Column(nullabletrue)]
  30.     private ?bool $sms null;
  31.     #[ORM\Column(nullabletrue)]
  32.     private ?bool $smsSent null;
  33.     public function __construct()
  34.     {
  35.         $this->createdAt = new \DateTime();
  36.         $this->seen false;
  37.         $this->smsSent false;
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getAppAccount(): ?AppAccount
  44.     {
  45.         return $this->appAccount;
  46.     }
  47.     public function setAppAccount(?AppAccount $appAccount): static
  48.     {
  49.         $this->appAccount $appAccount;
  50.         return $this;
  51.     }
  52.     public function getNotification(): ?Notification
  53.     {
  54.         return $this->notification;
  55.     }
  56.     public function setNotification(?Notification $notification): static
  57.     {
  58.         $this->notification $notification;
  59.         return $this;
  60.     }
  61.     public function isSeen(): ?bool
  62.     {
  63.         return $this->seen;
  64.     }
  65.     public function setSeen(?bool $seen): static
  66.     {
  67.         $this->seen $seen;
  68.         return $this;
  69.     }
  70.     public function getSeenAt(): ?\DateTimeInterface
  71.     {
  72.         return $this->seenAt;
  73.     }
  74.     public function setSeenAt(?\DateTimeInterface $seenAt): static
  75.     {
  76.         $this->seenAt $seenAt;
  77.         return $this;
  78.     }
  79.     public function getCreatedAt(): ?\DateTimeInterface
  80.     {
  81.         return $this->createdAt;
  82.     }
  83.     public function setCreatedAt(?\DateTimeInterface $createdAt): static
  84.     {
  85.         $this->createdAt $createdAt;
  86.         return $this;
  87.     }
  88.     public function getModifiedAt(): ?\DateTimeInterface
  89.     {
  90.         return $this->modifiedAt;
  91.     }
  92.     public function setModifiedAt(?\DateTimeInterface $modifiedAt): static
  93.     {
  94.         $this->modifiedAt $modifiedAt;
  95.         return $this;
  96.     }
  97.     /**
  98.      * @ORM\PreUpdate
  99.      */
  100.     public function onUpdate() {
  101.         $this->modifiedAt = new \DateTime();
  102.     }
  103.     public function isSms(): ?bool
  104.     {
  105.         return $this->sms;
  106.     }
  107.     public function setSms(?bool $sms): static
  108.     {
  109.         $this->sms $sms;
  110.         return $this;
  111.     }
  112.     public function isSmsSent(): ?bool
  113.     {
  114.         return $this->smsSent;
  115.     }
  116.     public function setSmsSent(?bool $smsSent): static
  117.     {
  118.         $this->smsSent $smsSent;
  119.         return $this;
  120.     }
  121. }