1 | <?php |
||
9 | * Class UserStatus |
||
10 | * @package Gvera\Models |
||
11 | * @Entity @Table(name="user_roles") |
||
12 | */ |
||
13 | class UserRole |
||
14 | { |
||
15 | /** @Id @Column(type="integer") @GeneratedValue */ |
||
16 | protected $id; |
||
17 | /** @Column(type="string", nullable=false, unique=true, length=20) */ |
||
18 | protected $name; |
||
19 | /** @Column(type="integer", unique=true, nullable=false) */ |
||
20 | protected $rolePriority; |
||
21 | |||
22 | /** |
||
23 | * Many Users have Many Stores. |
||
24 | * @ManyToMany(targetEntity="UserRoleAction", inversedBy="user_role_actions", fetch="EAGER", cascade={"persist"}) |
||
25 | */ |
||
26 | protected Collection $userRoleActions; |
||
|
|||
27 | |||
28 | /** |
||
29 | * UserRole constructor. |
||
30 | * @param GvEntityManager $entityManager |
||
31 | */ |
||
32 | public function __construct() |
||
33 | { |
||
34 | $this->userRoleActions = new ArrayCollection(); |
||
35 | } |
||
36 | |||
37 | |||
38 | /** |
||
39 | * @return mixed |
||
40 | */ |
||
41 | public function getName() |
||
42 | { |
||
43 | return $this->name; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @param mixed $name |
||
48 | */ |
||
49 | public function setName($name) |
||
50 | { |
||
106 |