src/Entity/User/PhoneConfirmation.php line 22

  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: Михаил
  5.  * Date: 25.09.2018
  6.  * Time: 23:16
  7.  */
  8. namespace App\Entity\User;
  9. use App\Entity\Traits\CreatedTrait;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * Class PhoneConfirm
  13.  * @package App\Entity\User
  14.  */
  15. #[ORM\Table(name'phone_confirmation')]
  16. #[ORM\Index(name'idx_pc_limits'columns: ['created_at''token''phone''ip'])]
  17. #[ORM\Entity(repositoryClass'App\Repository\User\PhoneConfirmationRepository')]
  18. #[ORM\HasLifecycleCallbacks]
  19. class PhoneConfirmation
  20. {
  21.     use CreatedTrait;
  22.     public const TIME_LIMIT 60 3;
  23.     #[ORM\Id]
  24.     #[ORM\Column(type'string'length100)]
  25.     private $uuid;
  26.     #[ORM\Column(type'string'length10)]
  27.     private $code;
  28.     #[ORM\Column(type'string'length20)]
  29.     private $phone;
  30.     /**
  31.      * @var  string|null
  32.      */
  33.     #[ORM\Column(type'string'nullabletruelength100)]
  34.     private $token;
  35.     /**
  36.      * @var  string|null
  37.      */
  38.     #[ORM\Column(type'string'nullabletruelength40)]
  39.     private $ip;
  40.     /**
  41.      * @return mixed
  42.      */
  43.     public function getUuid()
  44.     {
  45.         return $this->uuid;
  46.     }
  47.     /**
  48.      * @param mixed $uuid
  49.      */
  50.     public function setUuid($uuid): void
  51.     {
  52.         $this->uuid $uuid;
  53.     }
  54.     /**
  55.      * @return mixed
  56.      */
  57.     public function getCode()
  58.     {
  59.         return $this->code;
  60.     }
  61.     /**
  62.      * @param mixed $code
  63.      */
  64.     public function setCode($code): void
  65.     {
  66.         $this->code $code;
  67.     }
  68.     /**
  69.      * @return mixed
  70.      */
  71.     public function getPhone()
  72.     {
  73.         return $this->phone;
  74.     }
  75.     /**
  76.      * @param mixed $phone
  77.      */
  78.     public function setPhone($phone): void
  79.     {
  80.         $this->phone $phone;
  81.     }
  82.     /**
  83.      * @return string|null
  84.      */
  85.     public function getToken(): ?string
  86.     {
  87.         return $this->token;
  88.     }
  89.     /**
  90.      * @param string|null $token
  91.      */
  92.     public function setToken(?string $token): void
  93.     {
  94.         $this->token $token;
  95.     }
  96.     /**
  97.      * @return string|null
  98.      */
  99.     public function getIp(): ?string
  100.     {
  101.         return $this->ip;
  102.     }
  103.     /**
  104.      * @param string|null $ip
  105.      */
  106.     public function setIp(?string $ip): void
  107.     {
  108.         $this->ip $ip;
  109.     }
  110. }