]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/ApiBundle/Entity/Client.php
Changed relation between API client and refresh token
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Entity / Client.php
CommitLineData
fcb1fba5
NL
1<?php
2
3namespace Wallabag\ApiBundle\Entity;
4
fcb1fba5 5use Doctrine\ORM\Mapping as ORM;
619cc453 6use FOS\OAuthServerBundle\Entity\Client as BaseClient;
fcb1fba5
NL
7
8/**
9 * @ORM\Table("oauth2_clients")
10 * @ORM\Entity
11 */
12class 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
fcb1fba5
NL
33 public function __construct()
34 {
35 parent::__construct();
36 }
9c545fe0
TC
37
38 /**
39 * Get name.
40 *
41 * @return string
42 */
43 public function getName()
44 {
45 return $this->name;
46 }
47
48 /**
49 * Set name.
50 *
51 * @param string $name
52 *
53 * @return Client
54 */
55 public function setName($name)
56 {
57 $this->name = $name;
58
59 return $this;
60 }
fcb1fba5 61}