]>
Commit | Line | Data |
---|---|---|
fcb1fba5 NL |
1 | <?php |
2 | ||
3 | namespace Wallabag\ApiBundle\Entity; | |
4 | ||
fcb1fba5 | 5 | use Doctrine\ORM\Mapping as ORM; |
619cc453 | 6 | use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode; |
fcb1fba5 NL |
7 | |
8 | /** | |
9 | * @ORM\Table("oauth2_auth_codes") | |
10 | * @ORM\Entity | |
877787e5 JB |
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 | * }) | |
fcb1fba5 NL |
27 | */ |
28 | class AuthCode extends BaseAuthCode | |
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") | |
39 | * @ORM\JoinColumn(nullable=false) | |
40 | */ | |
41 | protected $client; | |
42 | ||
43 | /** | |
1210dae1 | 44 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") |
637f0df9 | 45 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE") |
fcb1fba5 NL |
46 | */ |
47 | protected $user; | |
48 | } |