<?php
namespace App\Entity;
use App\Repository\AuthorizationTokenRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: AuthorizationTokenRepository::class)]
class AuthorizationToken
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'authorizationTokens')]
private ?Client $client = null;
#[ORM\Column(length: 255)]
private ?string $token = null;
#[ORM\Column(nullable: true)]
private ?\DateTime $validTo = null;
#[ORM\Column(nullable: true)]
private ?\DateTime $createdAt = null;
public function getId(): ?int
{
return $this->id;
}
public function getClient(): ?Client
{
return $this->client;
}
public function setClient(?Client $client): static
{
$this->client = $client;
return $this;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(string $token): static
{
$this->token = $token;
return $this;
}
public function getValidTo(): ?\DateTime
{
return $this->validTo;
}
public function setValidTo(?\DateTime $validTo): static
{
$this->validTo = $validTo;
return $this;
}
public function getCreatedAt(): ?\DateTime
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTime $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
}