]>
Commit | Line | Data |
---|---|---|
1 | <?php | |
2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | |
4 | ||
5 | use Doctrine\ORM\Mapping as ORM; | |
6 | use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken; | |
7 | ||
8 | /** | |
9 | * @ORM\Table("oauth2_refresh_tokens") | |
10 | * @ORM\Entity | |
11 | * @ORM\AttributeOverrides({ | |
12 | * @ORM\AttributeOverride(name="token", | |
13 | * column=@ORM\Column( | |
14 | * name = "token", | |
15 | * type = "string", | |
16 | * length = 191 | |
17 | * ) | |
18 | * ), | |
19 | * @ORM\AttributeOverride(name="scope", | |
20 | * column=@ORM\Column( | |
21 | * name = "scope", | |
22 | * type = "string", | |
23 | * length = 191 | |
24 | * ) | |
25 | * ) | |
26 | * }) | |
27 | */ | |
28 | class RefreshToken extends BaseRefreshToken | |
29 | { | |
30 | /** | |
31 | * @ORM\Id | |
32 | * @ORM\Column(type="integer") | |
33 | * @ORM\GeneratedValue(strategy="AUTO") | |
34 | */ | |
35 | protected $id; | |
36 | ||
37 | /** | |
38 | * @ORM\ManyToOne(targetEntity="Client", inversedBy="refreshTokens") | |
39 | * @ORM\JoinColumn(nullable=false) | |
40 | */ | |
41 | protected $client; | |
42 | ||
43 | /** | |
44 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") | |
45 | */ | |
46 | protected $user; | |
47 | } |