<?php
namespace App\Entity;
use App\Repository\CourseViewsStatRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CourseViewsStatRepository::class)]
class CourseViewsStat
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $ip;
#[ORM\ManyToOne(targetEntity: Course::class, inversedBy: 'courseViewsStats')]
private $course;
#[ORM\Column(type: 'integer')]
private $views;
#[ORM\Column(type: 'string', length: 255)]
private $date;
public function getId(): ?int
{
return $this->id;
}
public function getIp(): ?string
{
return $this->ip;
}
public function setIp(string $ip): self
{
$this->ip = $ip;
return $this;
}
public function getCourse(): ?Course
{
return $this->course;
}
public function setCourse(?Course $course): self
{
$this->course = $course;
return $this;
}
public function getViews(): ?int
{
return $this->views;
}
public function setViews(int $views): self
{
$this->views = $views;
return $this;
}
public function getDate(): ?string
{
return $this->date;
}
public function setDate(string $date): self
{
$this->date = $date;
return $this;
}
}