src/Entity/LogPage.php line 10
<?php
namespace App\Entity;
use App\Repository\LogPageRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: LogPageRepository::class)]
class LogPage
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $url = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?User $user = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $dateLog = null;
#[ORM\Column]
private ?int $nbvues = null;
#[ORM\Column(length: 255)]
private ?string $page = null;
public function getId(): ?int
{
return $this->id;
}
public function getUrl(): ?string
{
return $this->url;
}
public function setUrl(string $url): self
{
$this->url = $url;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getNomUser(): ?string
{
if($this->user == null)
return "anonyme";
return $this->user->getNom()." ".$this->user->getPrenom();
}
public function getDateLog(): ?\DateTimeInterface
{
return $this->dateLog;
}
public function setDateLog(\DateTimeInterface $dateLog): self
{
$this->dateLog = $dateLog;
return $this;
}
public function getNbvues(): ?int
{
return $this->nbvues;
}
public function setNbvues(int $nbvues): self
{
$this->nbvues = $nbvues;
return $this;
}
public function getPage(): ?string
{
return $this->page;
}
public function setPage(string $page): self
{
$this->page = $page;
return $this;
}
}