src/Entity/OAuth2UserConsent.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OAuth2UserConsentRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use League\Bundle\OAuth2ServerBundle\Model\Client;
  7. /**
  8.  * @ORM\Entity(repositoryClass=OAuth2UserConsentRepository::class)
  9.  */
  10. class OAuth2UserConsent
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column
  16.      */
  17.     private ?int $id null;
  18.     /**
  19.      * @ORM\Column(nullable=true)
  20.      */
  21.     private ?\DateTimeImmutable $created null;
  22.     /**
  23.      * @ORM\Column(nullable=true)
  24.      */
  25.     private ?\DateTimeImmutable $expires null;
  26.     /**
  27.      * @ORM\Column(type=Types::SIMPLE_ARRAY, nullable=true)
  28.      */
  29.     private array $scopes = [];
  30.     /**
  31.      * @ORM\Column(length=255, nullable=true)
  32.      */
  33.     private ?string $ipAddress null;
  34.     /**
  35.      * @ORM\ManyToOne(cascade={"persist", "remove"})
  36.      * @ORM\JoinColumn(referencedColumnName="identifier", nullable=false)
  37.      */
  38.     private ?Client $client null;
  39.     /**
  40.      * @ORM\ManyToOne(inversedBy="oAuth2UserConsents")
  41.      * @ORM\JoinColumn(nullable=false)
  42.      */
  43.     private ?User $user null;
  44.     public function getId(): ?int
  45.     {
  46.         return $this->id;
  47.     }
  48.     public function getUser(): ?User
  49.     {
  50.         return $this->user;
  51.     }
  52.     public function setUser(User $user): self
  53.     {
  54.         $this->user $user;
  55.         return $this;
  56.     }
  57.     public function getCreated(): ?\DateTimeImmutable
  58.     {
  59.         return $this->created;
  60.     }
  61.     public function setCreated(\DateTimeImmutable $created): self
  62.     {
  63.         $this->created $created;
  64.         return $this;
  65.     }
  66.     public function getExpires(): ?\DateTimeImmutable
  67.     {
  68.         return $this->expires;
  69.     }
  70.     public function setExpires(?\DateTimeImmutable $expires): self
  71.     {
  72.         $this->expires $expires;
  73.         return $this;
  74.     }
  75.     public function getScopes(): array
  76.     {
  77.         return $this->scopes;
  78.     }
  79.     public function setScopes(?array $scopes): self
  80.     {
  81.         $this->scopes $scopes;
  82.         return $this;
  83.     }
  84.     public function getIpAddress(): ?string
  85.     {
  86.         return $this->ipAddress;
  87.     }
  88.     public function setIpAddress(?string $ipAddress): self
  89.     {
  90.         $this->ipAddress $ipAddress;
  91.         return $this;
  92.     }
  93.     public function getClient(): ?Client
  94.     {
  95.         return $this->client;
  96.     }
  97.     public function setClient(Client $client): self
  98.     {
  99.         $this->client $client;
  100.         return $this;
  101.     }
  102. }