src/Entity/ProViewsStat.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProViewsStatRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass: ProViewsStatRepository::class)]
  6. class ProViewsStat
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type: 'integer')]
  11.     private $id;
  12.     #[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'proViewsStats')]
  13.     #[ORM\JoinColumn(nullable: false)]
  14.     private $pro;
  15.     #[ORM\Column(type: 'string', length: 255)]
  16.     private $date;
  17.     #[ORM\Column(type: 'integer')]
  18.     private $views;
  19.     #[ORM\Column(type: 'string', length: 255)]
  20.     private $ip;
  21.     #[ORM\Column(length: 255, nullable: true)]
  22.     private ?string $userAgent = null;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getPro(): ?User
  28.     {
  29.         return $this->pro;
  30.     }
  31.     public function setPro(?User $pro): self
  32.     {
  33.         $this->pro = $pro;
  34.         return $this;
  35.     }
  36.     public function getDate(): ?string
  37.     {
  38.         return $this->date;
  39.     }
  40.     public function setDate(string $date): self
  41.     {
  42.         $this->date = $date;
  43.         return $this;
  44.     }
  45.     public function getViews(): ?int
  46.     {
  47.         return $this->views;
  48.     }
  49.     public function setViews(int $views): self
  50.     {
  51.         $this->views = $views;
  52.         return $this;
  53.     }
  54.     public function getIp(): ?string
  55.     {
  56.         return $this->ip;
  57.     }
  58.     public function setIp(string $ip): self
  59.     {
  60.         $this->ip = $ip;
  61.         return $this;
  62.     }
  63.     public function getUserAgent(): ?string
  64.     {
  65.         return $this->userAgent;
  66.     }
  67.     public function setUserAgent(?string $userAgent): static
  68.     {
  69.         $this->userAgent = $userAgent;
  70.         return $this;
  71.     }
  72. }