src/Entity/RefreshTokens.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RefreshTokensRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassRefreshTokensRepository::class)]
  6. class RefreshTokens
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length255)]
  13.     private $token;
  14.     #[ORM\Column(type'datetime')]
  15.     private $modified;
  16.     #[ORM\Column(type'datetime')]
  17.     private $created;
  18.     #[ORM\ManyToOne(targetEntityApiDetails::class, inversedBy'refreshTokens')]
  19.     private $api;
  20.     public function __construct()
  21.     {
  22.         $this->setCreated(new \DateTime());
  23.         if ($this->getModified() == null) {
  24.             $this->setModified(new \DateTime());
  25.         }
  26.     }
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getToken(): ?string
  32.     {
  33.         return $this->token;
  34.     }
  35.     public function setToken(string $token): self
  36.     {
  37.         $this->token $token;
  38.         return $this;
  39.     }
  40.     public function getModified(): ?\DateTimeInterface
  41.     {
  42.         return $this->modified;
  43.     }
  44.     public function setModified(\DateTimeInterface $modified): self
  45.     {
  46.         $this->modified $modified;
  47.         return $this;
  48.     }
  49.     public function getCreated(): ?\DateTimeInterface
  50.     {
  51.         return $this->created;
  52.     }
  53.     public function setCreated(\DateTimeInterface $created): self
  54.     {
  55.         $this->created $created;
  56.         return $this;
  57.     }
  58.     public function getApiDetails(): ?ApiDetails
  59.     {
  60.         return $this->api;
  61.     }
  62.     public function setApiDetails(?ApiDetails $api): self
  63.     {
  64.         $this->api $api;
  65.         return $this;
  66.     }
  67. }