src/Entity/User/PhoneConfirmation.php line 22
<?php
/**
* Created by PhpStorm.
* User: Михаил
* Date: 25.09.2018
* Time: 23:16
*/
namespace App\Entity\User;
use App\Entity\Traits\CreatedTrait;
use Doctrine\ORM\Mapping as ORM;
/**
* Class PhoneConfirm
* @package App\Entity\User
*/
#[ORM\Table(name: 'phone_confirmation')]
#[ORM\Index(name: 'idx_pc_limits', columns: ['created_at', 'token', 'phone', 'ip'])]
#[ORM\Entity(repositoryClass: 'App\Repository\User\PhoneConfirmationRepository')]
#[ORM\HasLifecycleCallbacks]
class PhoneConfirmation
{
use CreatedTrait;
public const TIME_LIMIT = 60 * 3;
#[ORM\Id]
#[ORM\Column(type: 'string', length: 100)]
private $uuid;
#[ORM\Column(type: 'string', length: 10)]
private $code;
#[ORM\Column(type: 'string', length: 20)]
private $phone;
/**
* @var string|null
*/
#[ORM\Column(type: 'string', nullable: true, length: 100)]
private $token;
/**
* @var string|null
*/
#[ORM\Column(type: 'string', nullable: true, length: 40)]
private $ip;
/**
* @return mixed
*/
public function getUuid()
{
return $this->uuid;
}
/**
* @param mixed $uuid
*/
public function setUuid($uuid): void
{
$this->uuid = $uuid;
}
/**
* @return mixed
*/
public function getCode()
{
return $this->code;
}
/**
* @param mixed $code
*/
public function setCode($code): void
{
$this->code = $code;
}
/**
* @return mixed
*/
public function getPhone()
{
return $this->phone;
}
/**
* @param mixed $phone
*/
public function setPhone($phone): void
{
$this->phone = $phone;
}
/**
* @return string|null
*/
public function getToken(): ?string
{
return $this->token;
}
/**
* @param string|null $token
*/
public function setToken(?string $token): void
{
$this->token = $token;
}
/**
* @return string|null
*/
public function getIp(): ?string
{
return $this->ip;
}
/**
* @param string|null $ip
*/
public function setIp(?string $ip): void
{
$this->ip = $ip;
}
}