diff options
Diffstat (limited to 'src/Wallabag/ApiBundle/Entity')
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/AccessToken.php | 17 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/AuthCode.php | 17 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/Client.php | 2 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/RefreshToken.php | 17 |
4 files changed, 52 insertions, 1 deletions
diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php index c09a0c80..98e0af3e 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php | |||
@@ -8,6 +8,22 @@ use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken; | |||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_access_tokens") | 9 | * @ORM\Table("oauth2_access_tokens") |
10 | * @ORM\Entity | 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 | * }) | ||
11 | */ | 27 | */ |
12 | class AccessToken extends BaseAccessToken | 28 | class AccessToken extends BaseAccessToken |
13 | { | 29 | { |
@@ -26,6 +42,7 @@ class AccessToken extends BaseAccessToken | |||
26 | 42 | ||
27 | /** | 43 | /** |
28 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") | 44 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") |
45 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE") | ||
29 | */ | 46 | */ |
30 | protected $user; | 47 | protected $user; |
31 | } | 48 | } |
diff --git a/src/Wallabag/ApiBundle/Entity/AuthCode.php b/src/Wallabag/ApiBundle/Entity/AuthCode.php index 4d4b09fe..7c9c8539 100644 --- a/src/Wallabag/ApiBundle/Entity/AuthCode.php +++ b/src/Wallabag/ApiBundle/Entity/AuthCode.php | |||
@@ -8,6 +8,22 @@ use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode; | |||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_auth_codes") | 9 | * @ORM\Table("oauth2_auth_codes") |
10 | * @ORM\Entity | 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 | * }) | ||
11 | */ | 27 | */ |
12 | class AuthCode extends BaseAuthCode | 28 | class AuthCode extends BaseAuthCode |
13 | { | 29 | { |
@@ -26,6 +42,7 @@ class AuthCode extends BaseAuthCode | |||
26 | 42 | ||
27 | /** | 43 | /** |
28 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") | 44 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") |
45 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE") | ||
29 | */ | 46 | */ |
30 | protected $user; | 47 | protected $user; |
31 | } | 48 | } |
diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index e6f98f98..78349820 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php | |||
@@ -11,7 +11,7 @@ use Wallabag\UserBundle\Entity\User; | |||
11 | 11 | ||
12 | /** | 12 | /** |
13 | * @ORM\Table("oauth2_clients") | 13 | * @ORM\Table("oauth2_clients") |
14 | * @ORM\Entity | 14 | * @ORM\Entity(repositoryClass="Wallabag\ApiBundle\Repository\ClientRepository") |
15 | */ | 15 | */ |
16 | class Client extends BaseClient | 16 | class Client extends BaseClient |
17 | { | 17 | { |
diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php index 822a02d8..55a507e1 100644 --- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php +++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php | |||
@@ -8,6 +8,22 @@ use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken; | |||
8 | /** | 8 | /** |
9 | * @ORM\Table("oauth2_refresh_tokens") | 9 | * @ORM\Table("oauth2_refresh_tokens") |
10 | * @ORM\Entity | 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 | * }) | ||
11 | */ | 27 | */ |
12 | class RefreshToken extends BaseRefreshToken | 28 | class RefreshToken extends BaseRefreshToken |
13 | { | 29 | { |
@@ -26,6 +42,7 @@ class RefreshToken extends BaseRefreshToken | |||
26 | 42 | ||
27 | /** | 43 | /** |
28 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") | 44 | * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User") |
45 | * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE") | ||
29 | */ | 46 | */ |
30 | protected $user; | 47 | protected $user; |
31 | } | 48 | } |