mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-14 08:36:34 +03:00
Add recipe for FOSOAuthServerBundle
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class RefreshToken extends BaseRefreshToken
|
||||
{
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\Client")
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
protected $client;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\User")
|
||||
* @ORM\JoinColumn(onDelete="CASCADE")
|
||||
*/
|
||||
protected $user;
|
||||
}
|
||||
Reference in New Issue
Block a user