2015-09-29 14:31:52 +02:00
|
|
|
<?php
|
|
|
|
|
2023-12-31 09:34:04 +01:00
|
|
|
namespace Wallabag\CoreBundle\Entity\Api;
|
2015-09-29 14:31:52 +02:00
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
2015-12-22 10:16:34 +01:00
|
|
|
use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
|
2015-09-29 14:31:52 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Table("oauth2_refresh_tokens")
|
|
|
|
* @ORM\Entity
|
2018-11-28 20:26:18 +01:00
|
|
|
* @ORM\AttributeOverrides({
|
|
|
|
* @ORM\AttributeOverride(name="token",
|
|
|
|
* column=@ORM\Column(
|
|
|
|
* name = "token",
|
|
|
|
* type = "string",
|
|
|
|
* length = 191
|
|
|
|
* )
|
|
|
|
* ),
|
|
|
|
* @ORM\AttributeOverride(name="scope",
|
|
|
|
* column=@ORM\Column(
|
|
|
|
* name = "scope",
|
|
|
|
* type = "string",
|
|
|
|
* length = 191
|
|
|
|
* )
|
|
|
|
* )
|
|
|
|
* })
|
2015-09-29 14:31:52 +02:00
|
|
|
*/
|
|
|
|
class RefreshToken extends BaseRefreshToken
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @ORM\Id
|
|
|
|
* @ORM\Column(type="integer")
|
|
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
|
|
*/
|
|
|
|
protected $id;
|
|
|
|
|
|
|
|
/**
|
2023-12-31 09:34:04 +01:00
|
|
|
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Api\Client", inversedBy="refreshTokens")
|
2015-09-29 14:31:52 +02:00
|
|
|
* @ORM\JoinColumn(nullable=false)
|
|
|
|
*/
|
|
|
|
protected $client;
|
|
|
|
|
|
|
|
/**
|
2023-12-30 23:32:36 +01:00
|
|
|
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User")
|
2019-05-10 16:49:19 +02:00
|
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
|
2015-09-29 14:31:52 +02:00
|
|
|
*/
|
|
|
|
protected $user;
|
|
|
|
}
|