src/Entity/VisitorCount.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VisitorCountRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassVisitorCountRepository::class)]
  6. class VisitorCount implements \Stringable
  7. {
  8.     const ARTICLE_READ_TYPE 'article_read';
  9.     const TOTAL_VISITORS_TYPE 'total_type';
  10.     const NONE_TYPE 'none';
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private $category;
  17.     #[ORM\Column(type'string'length255)]
  18.     private $type '';
  19.     #[ORM\Column(type'integer'nullabletrue)]
  20.     private $counter 0;
  21.     #[ORM\Column(type'integer'nullabletrue)]
  22.     private $pageId;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getCategory(): ?string
  28.     {
  29.         return $this->category;
  30.     }
  31.     public function setCategory(string $category): self
  32.     {
  33.         $this->category $category;
  34.         return $this;
  35.     }
  36.     public function getCounter(): ?int
  37.     {
  38.         return $this->counter;
  39.     }
  40.     public function setCounter(?int $counter): self
  41.     {
  42.         $this->counter $counter;
  43.         return $this;
  44.     }
  45.     public function getPageId(): ?int
  46.     {
  47.         return $this->pageId;
  48.     }
  49.     public function setPageId(?int $pageId): self
  50.     {
  51.         $this->pageId $pageId;
  52.         return $this;
  53.     }
  54.     public function __toString(): string
  55.     {
  56.         return (string) $this->getCategory();
  57.     }
  58.     public function getType(): string
  59.     {
  60.         return $this->type;
  61.     }
  62.     public function setType(string $type): void
  63.     {
  64.         $this->type $type;
  65.     }
  66. }