<?php
namespace App\Entity;
use App\Repository\UserNotificationRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass=UserNotificationRepository::class)
*/
class UserNotification
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=TvUser::class, inversedBy="userNotifications")
*/
private $tvUser;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="userNotifications")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity=Notification::class, inversedBy="userNotifications")
* @ORM\JoinColumn(nullable=false)
*/
private $notification;
/**
* @ORM\ManyToOne(targetEntity=TvCompany::class, inversedBy="userNotifications")
*/
private $tvCompany;
/**
* @ORM\ManyToOne(targetEntity=Company::class, inversedBy="userNotifications")
*/
private $company;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $deviceToken;
/**
* @ORM\Column(name="`received`",type="boolean", nullable=true, options={"default": 0})
*/
private $received = false;
/**
* @ORM\Column(name="`read`", type="boolean", nullable=true, options={"default": 0})
*/
private $read = false;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Gedmo\Timestampable(on="create")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Gedmo\Timestampable(on="update")
*/
private $updatedAt;
public function getId(): ?int
{
return $this->id;
}
public function getTvUser(): ?TvUser
{
return $this->tvUser;
}
public function setTvUser(?TvUser $tvUser): self
{
$this->tvUser = $tvUser;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getNotification(): ?Notification
{
return $this->notification;
}
public function setNotification(?Notification $notification): self
{
$this->notification = $notification;
return $this;
}
public function getReceived(): ?bool
{
return $this->received;
}
public function isReceived(): ?bool
{
return $this->received;
}
public function setReceived(?bool $received): self
{
$this->received = $received;
return $this;
}
public function getRead(): ?bool
{
return $this->read;
}
public function isRead(): ?bool
{
return $this->read;
}
public function setRead(?bool $read): self
{
$this->read = $read;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getTvCompany(): ?TvCompany
{
return $this->tvCompany;
}
public function setTvCompany(?TvCompany $tvCompany): self
{
$this->tvCompany = $tvCompany;
return $this;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
public function getDeviceToken(): ?string
{
return $this->deviceToken;
}
public function setDeviceToken(?string $deviceToken): self
{
$this->deviceToken = $deviceToken;
return $this;
}
}