mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Move Api entities to Core
This commit is contained in:
parent
3fc0b5fa5b
commit
81577ef6b0
13 changed files with 23 additions and 23 deletions
48
src/Wallabag/CoreBundle/Entity/Api/AuthCode.php
Normal file
48
src/Wallabag/CoreBundle/Entity/Api/AuthCode.php
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Entity\Api;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
|
||||
|
||||
/**
|
||||
* @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="Wallabag\CoreBundle\Entity\Api\Client")
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
protected $client;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\User")
|
||||
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
|
||||
*/
|
||||
protected $user;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue