mirror of
https://github.com/wallabag/wallabag.git
synced 2024-05-02 17:38:43 +00:00
55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Wallabag\ApiBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
|
|
use FOS\OAuthServerBundle\Model\ClientInterface;
|
|
use FOS\UserBundle\Model\UserInterface;
|
|
|
|
/**
|
|
* @ORM\Table("oauth2_auth_codes")
|
|
* @ORM\Entity
|
|
* @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
|
|
* )
|
|
* )
|
|
* })
|
|
*/
|
|
class AuthCode extends BaseAuthCode
|
|
{
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\Column(type="integer")
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
protected $id;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Client")
|
|
* @ORM\JoinColumn(nullable=false)
|
|
*
|
|
* @var ClientInterface
|
|
*/
|
|
protected $client;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User")
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
|
|
*
|
|
* @var UserInterface
|
|
*/
|
|
protected $user;
|
|
}
|