2015-09-29 12:31:52 +00:00
|
|
|
<?php
|
|
|
|
|
2023-12-31 08:34:04 +00:00
|
|
|
namespace Wallabag\CoreBundle\Entity\Api;
|
2015-09-29 12:31:52 +00:00
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
2015-12-22 09:16:34 +00:00
|
|
|
use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
|
2015-09-29 12:31:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @ORM\Table("oauth2_auth_codes")
|
|
|
|
* @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 AuthCode extends BaseAuthCode
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @ORM\Id
|
|
|
|
* @ORM\Column(type="integer")
|
|
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
|
|
*/
|
|
|
|
protected $id;
|
|
|
|
|
|
|
|
/**
|
2023-12-31 08:34:04 +00:00
|
|
|
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Api\Client")
|
2015-09-29 12:31:52 +00:00
|
|
|
* @ORM\JoinColumn(nullable=false)
|
|
|
|
*/
|
|
|
|
protected $client;
|
|
|
|
|
|
|
|
/**
|
2023-12-30 22:32:36 +00:00
|
|
|
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\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;
|
|
|
|
}
|