]>
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\Client as BaseClient; |
fcb1fba5 NL |
7 | |
8 | /** | |
9 | * @ORM\Table("oauth2_clients") | |
10 | * @ORM\Entity | |
11 | */ | |
12 | class Client extends BaseClient | |
13 | { | |
14 | /** | |
15 | * @ORM\Id | |
16 | * @ORM\Column(type="integer") | |
17 | * @ORM\GeneratedValue(strategy="AUTO") | |
18 | */ | |
19 | protected $id; | |
20 | ||
9c545fe0 TC |
21 | /** |
22 | * @var string | |
23 | * | |
24 | * @ORM\Column(name="name", type="text", nullable=true) | |
25 | */ | |
26 | protected $name; | |
27 | ||
b0da721a NL |
28 | /** |
29 | * @ORM\OneToMany(targetEntity="RefreshToken", mappedBy="client", cascade={"remove"}) | |
30 | */ | |
31 | protected $refreshTokens; | |
32 | ||
ee32248f JB |
33 | /** |
34 | * @ORM\OneToMany(targetEntity="AccessToken", mappedBy="client", cascade={"remove"}) | |
35 | */ | |
36 | protected $accessTokens; | |
37 | ||
fcb1fba5 NL |
38 | public function __construct() |
39 | { | |
40 | parent::__construct(); | |
41 | } | |
9c545fe0 TC |
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 | } | |
fcb1fba5 | 66 | } |