aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Entity
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/UserBundle/Entity')
-rw-r--r--src/Wallabag/UserBundle/Entity/Group.php20
-rw-r--r--src/Wallabag/UserBundle/Entity/User.php12
2 files changed, 30 insertions, 2 deletions
diff --git a/src/Wallabag/UserBundle/Entity/Group.php b/src/Wallabag/UserBundle/Entity/Group.php
new file mode 100644
index 00000000..9145959d
--- /dev/null
+++ b/src/Wallabag/UserBundle/Entity/Group.php
@@ -0,0 +1,20 @@
1<?php
2
3namespace Wallabag\UserBundle\Entity;
4
5use FOS\UserBundle\Model\Group as BaseGroup;
6use Doctrine\ORM\Mapping as ORM;
7
8/**
9 * @ORM\Entity
10 * @ORM\Table(name="`group`")
11 */
12class Group extends BaseGroup
13{
14 /**
15 * @ORM\Id
16 * @ORM\Column(type="integer")
17 * @ORM\GeneratedValue(strategy="AUTO")
18 */
19 protected $id;
20}
diff --git a/src/Wallabag/UserBundle/Entity/User.php b/src/Wallabag/UserBundle/Entity/User.php
index aba76ca7..781f7b03 100644
--- a/src/Wallabag/UserBundle/Entity/User.php
+++ b/src/Wallabag/UserBundle/Entity/User.php
@@ -98,8 +98,16 @@ class User extends BaseUser implements TwoFactorInterface, TrustedComputerInterf
98 private $authCode; 98 private $authCode;
99 99
100 /** 100 /**
101 * @var bool 101 * @ORM\ManyToMany(targetEntity="Wallabag\UserBundle\Entity\Group")
102 * 102 * @ORM\JoinTable(name="user_group",
103 * joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")},
104 * inverseJoinColumns={@ORM\JoinColumn(name="group_id", referencedColumnName="id")}
105 * )
106 */
107 protected $groups;
108
109 /**
110 * @var bool Enabled yes/no
103 * @ORM\Column(type="boolean") 111 * @ORM\Column(type="boolean")
104 */ 112 */
105 private $twoFactorAuthentication = false; 113 private $twoFactorAuthentication = false;