<?php
namespace App\Entity\User;
use Carbon\Carbon;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Token.
*
* @ORM\Embeddable()
*/
class Token
{
/**
* @ORM\Column(type="string", nullable=true)
*/
private ?string $string = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?Carbon $expires = null;
public function getString(): ?string
{
return $this->string;
}
/**
* @return $this
*/
public function setString(?string $string): self
{
$this->string = $string;
return $this;
}
public function getExpires(): ?Carbon
{
return $this->expires;
}
/**
* @return $this
*/
public function setExpires(?Carbon $expires): self
{
$this->expires = $expires;
return $this;
}
/**
* @return $this
*/
public function reset(): self
{
return $this->setString(null)->setExpires(null);
}
}