src/Entity/NotificationStatistics.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\App\NotificationStatisticsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=NotificationStatisticsRepository::class)
  7.  */
  8. class NotificationStatistics
  9. {
  10.     CONST ANSWER_REFUSED 'refusal';
  11.     CONST ANSWER_ACCEPTED 'acceptance';
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="datetime", nullable=true)
  20.      */
  21.     private $lastSeenDate;
  22.     /**
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $countRead;
  26.     /**
  27.      * @ORM\Column(type="boolean", nullable=true)
  28.      */
  29.     private $answer;
  30.     /**
  31.      * @ORM\Column (type="boolean", nullable=true)
  32.      */
  33.     private $checkboxIsChecked;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=Notification::class, inversedBy="notificationStatistics")
  36.      * @ORM\JoinColumn(nullable=false)
  37.      */
  38.     private $notification;
  39.     /**
  40.      * @ORM\Column(type="datetime", options={"default": "CURRENT_TIMESTAMP"})
  41.      */
  42.     private $activatedDate;
  43.     /**
  44.      * @ORM\Column(type="datetime", nullable=true)
  45.      */
  46.     private $desactivatedDate;
  47.     /**
  48.      * @ORM\Column(type="boolean", nullable=true)
  49.      */
  50.     private $readLater;
  51.     /**
  52.      * @ORM\Column(type="datetime", nullable=true)
  53.      */
  54.     private $emailSentDate;
  55.     /**
  56.      * @ORM\Column(type="string", length=255, nullable=true)
  57.      */
  58.     private $email;
  59.     /**
  60.      * @ORM\Column(type="string", length=255)
  61.      */
  62.     private $customerNumber;
  63.     /**
  64.      * @ORM\Column (type="string", length=255, nullable=true)
  65.      */
  66.     private $userId;
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getLastSeenDate(): ?\DateTimeInterface
  72.     {
  73.         return $this->lastSeenDate;
  74.     }
  75.     public function setLastSeenDate(?\DateTimeInterface $lastSeenDate): self
  76.     {
  77.         $this->lastSeenDate $lastSeenDate;
  78.         return $this;
  79.     }
  80.     public function getCountRead(): int
  81.     {
  82.         return $this->countRead;
  83.     }
  84.     public function setCountRead(int $countRead): self
  85.     {
  86.         $this->countRead $countRead;
  87.         return $this;
  88.     }
  89.     public function getAnswer(): ?bool
  90.     {
  91.         return $this->answer;
  92.     }
  93.     public function setAnswer(?bool $answer): self
  94.     {
  95.         $this->answer $answer;
  96.         return $this;
  97.     }
  98.     public function getCheckboxIsChecked(): ?bool
  99.     {
  100.         return $this->checkboxIsChecked;
  101.     }
  102.     public function setCheckboxIsChecked(?bool $checkboxIsChecked): self
  103.     {
  104.         $this->checkboxIsChecked $checkboxIsChecked;
  105.         return $this;
  106.     }
  107.     public function getNotification(): ?Notification
  108.     {
  109.         return $this->notification;
  110.     }
  111.     public function setNotification(?Notification $notification): self
  112.     {
  113.         $this->notification $notification;
  114.         return $this;
  115.     }
  116.     public function getActivatedDate(): ?\DateTimeInterface
  117.     {
  118.         return $this->activatedDate;
  119.     }
  120.     public function setActivatedDate(\DateTimeInterface $activatedDate): self
  121.     {
  122.         $this->activatedDate $activatedDate;
  123.         return $this;
  124.     }
  125.     public function getDesactivatedDate(): ?\DateTimeInterface
  126.     {
  127.         return $this->desactivatedDate;
  128.     }
  129.     public function setDesactivatedDate(?\DateTimeInterface $desactivatedDate): self
  130.     {
  131.         $this->desactivatedDate $desactivatedDate;
  132.         return $this;
  133.     }
  134.     public function getReadLater(): ?bool
  135.     {
  136.         return $this->readLater;
  137.     }
  138.     public function setReadLater(?bool $readLater): self
  139.     {
  140.         $this->readLater $readLater;
  141.         return $this;
  142.     }
  143.     public function getEmailSentDate(): ?\DateTimeInterface
  144.     {
  145.         return $this->emailSentDate;
  146.     }
  147.     public function setEmailSentDate(?\DateTimeInterface $emailSentDate): self
  148.     {
  149.         $this->emailSentDate $emailSentDate;
  150.         return $this;
  151.     }
  152.     public function getEmail(): ?string
  153.     {
  154.         return $this->email;
  155.     }
  156.     public function setEmail(?string $email): self
  157.     {
  158.         $this->email $email;
  159.         return $this;
  160.     }
  161.     public function incrementCountRead(): self
  162.     {
  163.         $this->countRead++;
  164.         return $this;
  165.     }
  166.     public function isActive(): bool
  167.     {
  168.         return !$this->getDesactivatedDate();
  169.     }
  170.     public function getCustomerNumber(): string
  171.     {
  172.         return $this->customerNumber;
  173.     }
  174.     public function setCustomerNumber(string $customerNumber): self
  175.     {
  176.         $this->customerNumber $customerNumber;
  177.         return $this;
  178.     }
  179.     public function getUserId(): ?string
  180.     {
  181.         return $this->userId;
  182.     }
  183.     public function setUserId(?string $userId): self
  184.     {
  185.         $this->userId $userId;
  186.         return $this;
  187.     }
  188. }