| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | #[ORM\Table(name: 'ticket_rel_user')] |
||
| 13 | #[ORM\Entity] |
||
| 14 | class TicketRelUser |
||
| 15 | { |
||
| 16 | use UserTrait; |
||
| 17 | |||
| 18 | #[ORM\Id] |
||
| 19 | #[ORM\ManyToOne(targetEntity: User::class)] |
||
| 20 | #[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
||
| 21 | protected User $user; |
||
| 22 | |||
| 23 | #[ORM\Id] |
||
| 24 | #[ORM\ManyToOne(targetEntity: Ticket::class)] |
||
| 25 | #[ORM\JoinColumn(name: 'ticket_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
||
| 26 | protected Ticket $ticket; |
||
| 27 | |||
| 28 | #[ORM\Column(name: 'notify', type: 'boolean', nullable: false)] |
||
| 29 | protected bool $notify; |
||
| 30 | |||
| 31 | public function __construct(User $user, Ticket $ticket, bool $notify) |
||
| 32 | { |
||
| 33 | $this->user = $user; |
||
| 34 | $this->ticket = $ticket; |
||
| 35 | $this->notify = $notify; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function getTicket(): Ticket |
||
| 39 | { |
||
| 40 | return $this->ticket; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function setTicket(Ticket $ticket): self |
||
| 44 | { |
||
| 45 | $this->ticket = $ticket; |
||
| 46 | |||
| 47 | return $this; |
||
| 48 | } |
||
| 49 | |||
| 50 | public function isNotify(): bool |
||
| 53 | } |
||
| 54 | |||
| 55 | public function setNotify(bool $notify): self |
||
| 60 | } |
||
| 61 | } |
||
| 62 |