<?php
namespace App\Entity;
use App\Repository\App\NotificationStatisticsRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=NotificationStatisticsRepository::class)
*/
class NotificationStatistics
{
CONST ANSWER_REFUSED = 'refusal';
CONST ANSWER_ACCEPTED = 'acceptance';
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $lastSeenDate;
/**
* @ORM\Column(type="integer")
*/
private $countRead;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $answer;
/**
* @ORM\Column (type="boolean", nullable=true)
*/
private $checkboxIsChecked;
/**
* @ORM\ManyToOne(targetEntity=Notification::class, inversedBy="notificationStatistics")
* @ORM\JoinColumn(nullable=false)
*/
private $notification;
/**
* @ORM\Column(type="datetime", options={"default": "CURRENT_TIMESTAMP"})
*/
private $activatedDate;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $desactivatedDate;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $readLater;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $emailSentDate;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email;
/**
* @ORM\Column(type="string", length=255)
*/
private $customerNumber;
/**
* @ORM\Column (type="string", length=255, nullable=true)
*/
private $userId;
public function getId(): ?int
{
return $this->id;
}
public function getLastSeenDate(): ?\DateTimeInterface
{
return $this->lastSeenDate;
}
public function setLastSeenDate(?\DateTimeInterface $lastSeenDate): self
{
$this->lastSeenDate = $lastSeenDate;
return $this;
}
public function getCountRead(): int
{
return $this->countRead;
}
public function setCountRead(int $countRead): self
{
$this->countRead = $countRead;
return $this;
}
public function getAnswer(): ?bool
{
return $this->answer;
}
public function setAnswer(?bool $answer): self
{
$this->answer = $answer;
return $this;
}
public function getCheckboxIsChecked(): ?bool
{
return $this->checkboxIsChecked;
}
public function setCheckboxIsChecked(?bool $checkboxIsChecked): self
{
$this->checkboxIsChecked = $checkboxIsChecked;
return $this;
}
public function getNotification(): ?Notification
{
return $this->notification;
}
public function setNotification(?Notification $notification): self
{
$this->notification = $notification;
return $this;
}
public function getActivatedDate(): ?\DateTimeInterface
{
return $this->activatedDate;
}
public function setActivatedDate(\DateTimeInterface $activatedDate): self
{
$this->activatedDate = $activatedDate;
return $this;
}
public function getDesactivatedDate(): ?\DateTimeInterface
{
return $this->desactivatedDate;
}
public function setDesactivatedDate(?\DateTimeInterface $desactivatedDate): self
{
$this->desactivatedDate = $desactivatedDate;
return $this;
}
public function getReadLater(): ?bool
{
return $this->readLater;
}
public function setReadLater(?bool $readLater): self
{
$this->readLater = $readLater;
return $this;
}
public function getEmailSentDate(): ?\DateTimeInterface
{
return $this->emailSentDate;
}
public function setEmailSentDate(?\DateTimeInterface $emailSentDate): self
{
$this->emailSentDate = $emailSentDate;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function incrementCountRead(): self
{
$this->countRead++;
return $this;
}
public function isActive(): bool
{
return !$this->getDesactivatedDate();
}
public function getCustomerNumber(): string
{
return $this->customerNumber;
}
public function setCustomerNumber(string $customerNumber): self
{
$this->customerNumber = $customerNumber;
return $this;
}
public function getUserId(): ?string
{
return $this->userId;
}
public function setUserId(?string $userId): self
{
$this->userId = $userId;
return $this;
}
}