src/Entity/LastViewedBuilding.php line 9
<?php
namespace App\Entity;
use App\Repository\LastViewedBuildingRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: LastViewedBuildingRepository::class)]
class LastViewedBuilding
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private ?User $user = null;
#[ORM\ManyToOne(targetEntity: Building::class)]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private ?Building $building = null;
#[ORM\Column(type: 'datetime_immutable')]
private ?\DateTimeImmutable $viewedAt = null;
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getBuilding(): ?Building
{
return $this->building;
}
public function setBuilding(?Building $building): self
{
$this->building = $building;
return $this;
}
public function getViewedAt(): ?\DateTimeImmutable
{
return $this->viewedAt;
}
public function setViewedAt(\DateTimeImmutable $viewedAt): self
{
$this->viewedAt = $viewedAt;
return $this;
}
}