src/Entity/Token.php line 9

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TokenRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassTokenRepository::class)]
  6. class Token
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne(inversedBy'tokens')]
  13.     #[ORM\JoinColumn(nullablefalse)]
  14.     private ?User $Usuario null;
  15.     #[ORM\Column(length255nullablefalse)]
  16.     private ?string $token null;
  17.     
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $device null;
  20.     #[ORM\Column]
  21.     private ?\DateTimeImmutable $created_at null;
  22.     
  23.     #[ORM\Column]
  24.     private ?\DateTimeImmutable $updated_at null;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getUsuario(): ?User
  30.     {
  31.         return $this->Usuario;
  32.     }
  33.     public function setUsuario(?User $usuario): self
  34.     {
  35.         $this->Usuario $usuario;
  36.         return $this;
  37.     }
  38.     public function getToken(): ?string
  39.     {
  40.         return $this->token;
  41.     }
  42.     public function setToken(?string $token): self
  43.     {
  44.         $this->token $token;
  45.         return $this;
  46.     }
  47.     
  48.     public function getDevice(): ?string
  49.     {
  50.         return $this->device;
  51.     }
  52.     public function setDevice(?string $device): self
  53.     {
  54.         $this->device $device;
  55.         return $this;
  56.     }
  57.     public function getCreatedAt(): ?\DateTimeImmutable
  58.     {
  59.         return $this->created_at;
  60.     }
  61.     public function setCreatedAt(\DateTimeImmutable $created_at): self
  62.     {
  63.         $this->created_at $created_at;
  64.         return $this;
  65.     }
  66.     
  67.     public function getUpdatedAt(): ?\DateTimeImmutable
  68.     {
  69.         return $this->updated_at;
  70.     }
  71.     public function setUpdatedAt(\DateTimeImmutable $updated_at): self
  72.     {
  73.         $this->updated_at $updated_at;
  74.         return $this;
  75.     }
  76. }