<?php
namespace App\Entity;
use App\Repository\ResetPasswordRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ResetPasswordRepository::class)
*/
class ResetPassword
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="resetPasswords")
* @ORM\JoinColumn(nullable=false)
*/
private $user;
/**
* @ORM\Column(type="string", length=255)
*/
private $token;
/**
* @ORM\Column(type="boolean")
*/
private $active;
/**
* @ORM\Column(type="datetime")
*/
private $created_at;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $expires_at;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $validated_at;
public function __construct()
{
$this->created_at=new \DateTime();
}
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 getToken(): ?string
{
return $this->token;
}
public function setToken(string $token): self
{
$this->token = $token;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeInterface $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getExpiresAt(): ?\DateTimeInterface
{
return $this->expires_at;
}
public function setExpiresAt(?\DateTimeInterface $expires_at): self
{
$this->expires_at = $expires_at;
return $this;
}
public function getValidatedAt(): ?\DateTimeInterface
{
return $this->validated_at;
}
public function setValidatedAt(?\DateTimeInterface $validated_at): self
{
$this->validated_at = $validated_at;
return $this;
}
}