src/Entity/PasswordHistory.php line 10
<?php
namespace App\Entity;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\PasswordHistoryRepository;
#[ORM\Entity(repositoryClass: PasswordHistoryRepository::class)]
class PasswordHistory
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'passwordHistories')]
#[ORM\JoinColumn(nullable: false)]
private ?User $user = null;
#[ORM\Column]
private ?\DateTimeImmutable $date = null;
#[ORM\Column(length: 255)]
private ?string $password = null;
public function __construct()
{
$this->date = new DateTimeImmutable();
}
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 getDate(): ?\DateTimeImmutable
{
return $this->date;
}
public function setDate(\DateTimeImmutable $date): self
{
$this->date = $date;
return $this;
}
public function getPassword(): ?string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
}