| Total Complexity | 5 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | #[ORM\Table(name: 'course_home_notify_notification_rel_user')] |
||
| 10 | #[ORM\Entity] |
||
| 11 | class NotificationRelUser |
||
| 12 | { |
||
| 13 | #[ORM\Column(name: 'id', type: 'integer')] |
||
| 14 | #[ORM\Id] |
||
| 15 | #[ORM\GeneratedValue] |
||
| 16 | private ?int $id = 0; |
||
| 17 | |||
| 18 | #[ORM\ManyToOne(targetEntity: Notification::class)] |
||
| 19 | #[ORM\JoinColumn(name: 'notification_id', referencedColumnName: 'id', nullable: false, onDelete: 'CASCADE')] |
||
| 20 | private Notification $notification; |
||
| 21 | |||
| 22 | #[ORM\ManyToOne(targetEntity: User::class)] |
||
| 23 | #[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: false, onDelete: 'CASCADE')] |
||
| 24 | private User $user; |
||
| 25 | |||
| 26 | public function getId(): ?int |
||
| 27 | { |
||
| 28 | return $this->id; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getNotification(): Notification |
||
| 32 | { |
||
| 33 | return $this->notification; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function setNotification(Notification $notification): static |
||
| 41 | } |
||
| 42 | |||
| 43 | public function getUser(): User |
||
| 44 | { |
||
| 45 | return $this->user; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function setUser(User $user): static |
||
| 53 | } |
||
| 54 | } |
||
| 55 |