1 | <?php |
||
14 | class UserRole extends Role |
||
15 | { |
||
16 | /** |
||
17 | * @var int |
||
18 | * |
||
19 | * @ORM\Id |
||
20 | * @ORM\GeneratedValue(strategy="AUTO") |
||
21 | * @ORM\Column(type="integer") |
||
22 | */ |
||
23 | private $id; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | * |
||
28 | * @ORM\Column(type="string") |
||
29 | */ |
||
30 | private $roleName; |
||
31 | |||
32 | /** |
||
33 | * @var DateTime |
||
34 | * |
||
35 | * @ORM\Column(type="datetime") |
||
36 | */ |
||
37 | private $createdOn; |
||
38 | |||
39 | /** |
||
40 | * @var DateTime |
||
41 | * |
||
42 | * @ORM\Column(type="datetime") |
||
43 | */ |
||
44 | private $editedOn; |
||
45 | |||
46 | /** |
||
47 | * @param string $roleName |
||
48 | */ |
||
49 | public function __construct(string $roleName) |
||
55 | |||
56 | /** |
||
57 | * @return int |
||
58 | */ |
||
59 | public function getId(): int |
||
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getRole(): string |
||
71 | |||
72 | /** |
||
73 | * @ORM\PrePersist |
||
74 | */ |
||
75 | public function onPrePersist(): void |
||
80 | |||
81 | /** |
||
82 | * @ORM\PreUpdate |
||
83 | */ |
||
84 | public function onPreUpdate(): void |
||
88 | |||
89 | public function getCreatedOn(): DateTime |
||
93 | |||
94 | public function getEditedOn(): DateTime |
||
98 | |||
99 | public function __toString(): string |
||
103 | } |
||
104 |