diff options
author | Paulino Michelazzo <paulino@michelazzo.com.br> | 2016-10-18 22:48:23 +0200 |
---|---|---|
committer | Paulino Michelazzo <paulino@michelazzo.com.br> | 2016-10-18 22:48:23 +0200 |
commit | 99731f0bb1f6fd2815eeb9af504ce86df927657b (patch) | |
tree | b080efc608d2bbd52b77a4a0067402007f50c5a8 /src/Wallabag/ApiBundle/Entity | |
parent | 3a3c6b866b52721431bed22426d9abfcd0d2dfe0 (diff) | |
parent | 7180aaed45dce62e40620a9e4b202526ebd6a3bb (diff) | |
download | wallabag-99731f0bb1f6fd2815eeb9af504ce86df927657b.tar.gz wallabag-99731f0bb1f6fd2815eeb9af504ce86df927657b.tar.zst wallabag-99731f0bb1f6fd2815eeb9af504ce86df927657b.zip |
Merge remote-tracking branch 'wallabag/master'
Diffstat (limited to 'src/Wallabag/ApiBundle/Entity')
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/AccessToken.php | 2 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/Client.php | 41 | ||||
-rw-r--r-- | src/Wallabag/ApiBundle/Entity/RefreshToken.php | 2 |
3 files changed, 43 insertions, 2 deletions
diff --git a/src/Wallabag/ApiBundle/Entity/AccessToken.php b/src/Wallabag/ApiBundle/Entity/AccessToken.php index 2ff63a83..c09a0c80 100644 --- a/src/Wallabag/ApiBundle/Entity/AccessToken.php +++ b/src/Wallabag/ApiBundle/Entity/AccessToken.php | |||
@@ -19,7 +19,7 @@ class AccessToken extends BaseAccessToken | |||
19 | protected $id; | 19 | protected $id; |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @ORM\ManyToOne(targetEntity="Client") | 22 | * @ORM\ManyToOne(targetEntity="Client", inversedBy="accessTokens") |
23 | * @ORM\JoinColumn(nullable=false) | 23 | * @ORM\JoinColumn(nullable=false) |
24 | */ | 24 | */ |
25 | protected $client; | 25 | protected $client; |
diff --git a/src/Wallabag/ApiBundle/Entity/Client.php b/src/Wallabag/ApiBundle/Entity/Client.php index c04ed0f6..f7898ac8 100644 --- a/src/Wallabag/ApiBundle/Entity/Client.php +++ b/src/Wallabag/ApiBundle/Entity/Client.php | |||
@@ -18,8 +18,49 @@ class Client extends BaseClient | |||
18 | */ | 18 | */ |
19 | protected $id; | 19 | protected $id; |
20 | 20 | ||
21 | /** | ||
22 | * @var string | ||
23 | * | ||
24 | * @ORM\Column(name="name", type="text", nullable=true) | ||
25 | */ | ||
26 | protected $name; | ||
27 | |||
28 | /** | ||
29 | * @ORM\OneToMany(targetEntity="RefreshToken", mappedBy="client", cascade={"remove"}) | ||
30 | */ | ||
31 | protected $refreshTokens; | ||
32 | |||
33 | /** | ||
34 | * @ORM\OneToMany(targetEntity="AccessToken", mappedBy="client", cascade={"remove"}) | ||
35 | */ | ||
36 | protected $accessTokens; | ||
37 | |||
21 | public function __construct() | 38 | public function __construct() |
22 | { | 39 | { |
23 | parent::__construct(); | 40 | parent::__construct(); |
24 | } | 41 | } |
42 | |||
43 | /** | ||
44 | * Get name. | ||
45 | * | ||
46 | * @return string | ||
47 | */ | ||
48 | public function getName() | ||
49 | { | ||
50 | return $this->name; | ||
51 | } | ||
52 | |||
53 | /** | ||
54 | * Set name. | ||
55 | * | ||
56 | * @param string $name | ||
57 | * | ||
58 | * @return Client | ||
59 | */ | ||
60 | public function setName($name) | ||
61 | { | ||
62 | $this->name = $name; | ||
63 | |||
64 | return $this; | ||
65 | } | ||
25 | } | 66 | } |
diff --git a/src/Wallabag/ApiBundle/Entity/RefreshToken.php b/src/Wallabag/ApiBundle/Entity/RefreshToken.php index 6d0cab68..822a02d8 100644 --- a/src/Wallabag/ApiBundle/Entity/RefreshToken.php +++ b/src/Wallabag/ApiBundle/Entity/RefreshToken.php | |||
@@ -19,7 +19,7 @@ class RefreshToken extends BaseRefreshToken | |||
19 | protected $id; | 19 | protected $id; |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @ORM\ManyToOne(targetEntity="Client") | 22 | * @ORM\ManyToOne(targetEntity="Client", inversedBy="refreshTokens") |
23 | * @ORM\JoinColumn(nullable=false) | 23 | * @ORM\JoinColumn(nullable=false) |
24 | */ | 24 | */ |
25 | protected $client; | 25 | protected $client; |