| 1 | <?php |
||
| 12 | class PassportRole |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @ORM\Id |
||
| 16 | * @ORM\Column(type="integer") |
||
| 17 | * @ORM\GeneratedValue |
||
| 18 | * @var int $id |
||
| 19 | */ |
||
| 20 | private $id; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @ORM\Column(type="integer") |
||
| 24 | * @var int $userId |
||
| 25 | */ |
||
| 26 | private $userId; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * many users have many roles |
||
| 30 | * @ORM\ManyToOne(targetEntity="Role") |
||
| 31 | * @ORM\JoinColumn(name="role", referencedColumnName="id") |
||
| 32 | * @var Role $role |
||
| 33 | */ |
||
| 34 | private $role; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @ORM\Column(type="integer", nullable=true) |
||
| 38 | * @var int $entityId |
||
| 39 | */ |
||
| 40 | private $entityId; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return int |
||
| 44 | */ |
||
| 45 | public function getId(): int |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param int $id |
||
| 52 | */ |
||
| 53 | public function setId(int $id): void |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return int |
||
| 60 | */ |
||
| 61 | public function getUserId(): int |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param int $userId |
||
| 68 | */ |
||
| 69 | public function setUserId(int $userId): void |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return Role |
||
| 76 | */ |
||
| 77 | public function getRole(): Role |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @param Role $role |
||
| 84 | */ |
||
| 85 | public function setRole(Role $role): void |
||
| 89 | |||
| 90 | /** |
||
| 91 | * @return int|null |
||
| 92 | */ |
||
| 93 | public function getEntityId(): ?int |
||
| 97 | |||
| 98 | /** |
||
| 99 | * @param int $entityId |
||
| 100 | */ |
||
| 101 | public function setEntityId(int $entityId): void |
||
| 105 | } |