| 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 | public function __construct(string $roleName) |
||
| 52 | |||
| 53 | public function getId(): int |
||
| 57 | |||
| 58 | public function getRole(): string |
||
| 62 | |||
| 63 | public function getCreatedOn(): DateTime |
||
| 67 | |||
| 68 | public function getEditedOn(): DateTime |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @ORM\PrePersist |
||
| 75 | */ |
||
| 76 | public function onPrePersist(): void |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @ORM\PreUpdate |
||
| 84 | */ |
||
| 85 | public function onPreUpdate(): void |
||
| 89 | |||
| 90 | public function __toString(): string |
||
| 94 | } |
||
| 95 |