src/Entity/UserVerificationTokens.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * UserVerificationTokens
  6.  *
  7.  * @ORM\Table(
  8.  *      name="user_verification_tokens",
  9.  *      indexes={@ORM\Index(name="token_idx", columns={"token"})}
  10.  * )
  11.  * @ORM\Entity(repositoryClass="App\Repository\UserVerificationTokenRepository")
  12.  */
  13. class UserVerificationTokens
  14. {
  15.     /**
  16.      * @var int
  17.      *
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var int
  25.      *
  26.      * @ORM\Column(name="user_id", type="integer", nullable=false)
  27.      */
  28.     private $userId;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="token", type="string", length=32, nullable=false)
  33.      */
  34.     private $token;
  35.     /**
  36.      * @var \DateTime
  37.      *
  38.      * @ORM\Column(name="creation_date", type="date", nullable=true)
  39.      */
  40.     private $creationDate;
  41.     /**
  42.      * Gets the unique verification token.
  43.      *
  44.      * @return string
  45.      */
  46.     public function getToken(): string {
  47.         return $this->token;
  48.     }
  49.     /**
  50.      * Sets the unique verification token.
  51.      *
  52.      * @param string $token
  53.      *
  54.      * @return UserVerificationTokens
  55.      */
  56.     public function setToken(string $token): self {
  57.         $this->token $token;
  58.         return $this;
  59.     }
  60.     /**
  61.      * Sets the user associated with the verification token.
  62.      *
  63.      * @param int $userId
  64.      *
  65.      * @return UserVerificationTokens
  66.      */
  67.     public function setUserId(int $userId): self {
  68.         $this->userId $userId;
  69.         return $this;
  70.     }
  71.     /**
  72.      * Gets the ID of the user associated with this token.
  73.      *
  74.      * @return int
  75.      */
  76.     public function getUserId(): int {
  77.         return $this->userId;
  78.     }
  79.     /**
  80.      * Sets the creation date.
  81.      *
  82.      * @param \DateTime $creationDate
  83.      *
  84.      * @return UserVerificationTokens
  85.      */
  86.     public function setCreationDate(\DateTime $creationDate): self {
  87.         $this->creationDate $creationDate;
  88.         return $this;
  89.     }
  90.     /**
  91.      * Gets the creation date.
  92.      *
  93.      * @return \DateTime
  94.      */
  95.     public function getCreationDate(): \DateTime {
  96.         return $this->creationDate;
  97.     }
  98. }