2015-09-29 12:31:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Wallabag\ApiBundle\Entity;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
2015-12-22 09:16:34 +00:00
|
|
|
use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
|
2015-09-29 12:31:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Table("oauth2_access_tokens")
|
|
|
|
* @ORM\Entity
|
2018-11-28 19:26:18 +00: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 12:31:52 +00:00
|
|
|
*/
|
|
|
|
class AccessToken extends BaseAccessToken
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @ORM\Id
|
|
|
|
* @ORM\Column(type="integer")
|
|
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
|
|
*/
|
|
|
|
protected $id;
|
|
|
|
|
|
|
|
/**
|
2016-10-09 18:51:37 +00:00
|
|
|
* @ORM\ManyToOne(targetEntity="Client", inversedBy="accessTokens")
|
2015-09-29 12:31:52 +00:00
|
|
|
* @ORM\JoinColumn(nullable=false)
|
|
|
|
*/
|
|
|
|
protected $client;
|
|
|
|
|
|
|
|
/**
|
2015-10-02 12:51:41 +00:00
|
|
|
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
|
2019-05-10 14:49:19 +00:00
|
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
|
2015-09-29 12:31:52 +00:00
|
|
|
*/
|
|
|
|
protected $user;
|
|
|
|
}
|