src/Entity/UserNotification.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserNotificationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7.  * @ORM\Entity(repositoryClass=UserNotificationRepository::class)
  8.  */
  9. class UserNotification
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=TvUser::class, inversedBy="userNotifications")
  19.      */
  20.     private $tvUser;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userNotifications")
  23.      */
  24.     private $user;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Notification::class, inversedBy="userNotifications")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $notification;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=TvCompany::class, inversedBy="userNotifications")
  32.      */
  33.     private $tvCompany;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="userNotifications")
  36.      */
  37.     private $company;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $deviceToken;
  42.     /**
  43.      * @ORM\Column(name="`received`",type="boolean", nullable=true, options={"default": 0})
  44.      */
  45.     private $received false;
  46.     /**
  47.      * @ORM\Column(name="`read`", type="boolean", nullable=true, options={"default": 0})
  48.      */
  49.     private $read false;
  50.     /**
  51.      * @ORM\Column(type="datetime", nullable=true)
  52.      * @Gedmo\Timestampable(on="create")
  53.      */
  54.     private $createdAt;
  55.     /**
  56.      * @ORM\Column(type="datetime", nullable=true)
  57.      * @Gedmo\Timestampable(on="update")
  58.      */
  59.     private $updatedAt;
  60.     public function getId(): ?int
  61.     {
  62.         return $this->id;
  63.     }
  64.     public function getTvUser(): ?TvUser
  65.     {
  66.         return $this->tvUser;
  67.     }
  68.     public function setTvUser(?TvUser $tvUser): self
  69.     {
  70.         $this->tvUser $tvUser;
  71.         return $this;
  72.     }
  73.     public function getUser(): ?User
  74.     {
  75.         return $this->user;
  76.     }
  77.     public function setUser(?User $user): self
  78.     {
  79.         $this->user $user;
  80.         return $this;
  81.     }
  82.     public function getNotification(): ?Notification
  83.     {
  84.         return $this->notification;
  85.     }
  86.     public function setNotification(?Notification $notification): self
  87.     {
  88.         $this->notification $notification;
  89.         return $this;
  90.     }
  91.     public function getReceived(): ?bool
  92.     {
  93.         return $this->received;
  94.     }
  95.     public function isReceived(): ?bool
  96.     {
  97.         return $this->received;
  98.     }
  99.     public function setReceived(?bool $received): self
  100.     {
  101.         $this->received $received;
  102.         return $this;
  103.     }
  104.     public function getRead(): ?bool
  105.     {
  106.         return $this->read;
  107.     }
  108.     public function isRead(): ?bool
  109.     {
  110.         return $this->read;
  111.     }
  112.     public function setRead(?bool $read): self
  113.     {
  114.         $this->read $read;
  115.         return $this;
  116.     }
  117.     public function getCreatedAt(): ?\DateTimeInterface
  118.     {
  119.         return $this->createdAt;
  120.     }
  121.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  122.     {
  123.         $this->createdAt $createdAt;
  124.         return $this;
  125.     }
  126.     public function getUpdatedAt(): ?\DateTimeInterface
  127.     {
  128.         return $this->updatedAt;
  129.     }
  130.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  131.     {
  132.         $this->updatedAt $updatedAt;
  133.         return $this;
  134.     }
  135.     public function getTvCompany(): ?TvCompany
  136.     {
  137.         return $this->tvCompany;
  138.     }
  139.     public function setTvCompany(?TvCompany $tvCompany): self
  140.     {
  141.         $this->tvCompany $tvCompany;
  142.         return $this;
  143.     }
  144.     public function getCompany(): ?Company
  145.     {
  146.         return $this->company;
  147.     }
  148.     public function setCompany(?Company $company): self
  149.     {
  150.         $this->company $company;
  151.         return $this;
  152.     }
  153.     public function getDeviceToken(): ?string
  154.     {
  155.         return $this->deviceToken;
  156.     }
  157.     public function setDeviceToken(?string $deviceToken): self
  158.     {
  159.         $this->deviceToken $deviceToken;
  160.         return $this;
  161.     }
  162. }