Total Complexity | 6 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | #[ORM\Table(name: 'toplinks_link_rel_tool')] |
||
12 | #[ORM\Entity(repositoryClass: TopLinkRelToolRepository::class)] |
||
13 | class TopLinkRelTool |
||
14 | { |
||
15 | #[ORM\Column(name: 'id', type: 'integer')] |
||
16 | #[ORM\Id] |
||
17 | #[ORM\GeneratedValue] |
||
18 | private ?int $id; |
||
19 | #[ORM\ManyToOne(targetEntity: TopLink::class, inversedBy: 'tools')] |
||
20 | #[ORM\JoinColumn(name: 'link_id', referencedColumnName: 'id')] |
||
21 | private ?TopLink $link; |
||
22 | |||
23 | #[ORM\OneToOne(targetEntity: CTool::class, cascade: ['persist', 'remove'])] |
||
24 | #[ORM\JoinColumn(name: 'tool_id', referencedColumnName: 'iid', nullable: true, onDelete: 'CASCADE')] |
||
25 | private ?CTool $tool; |
||
26 | |||
27 | public function getId(): ?int |
||
28 | { |
||
29 | return $this->id; |
||
30 | } |
||
31 | |||
32 | public function setId(int $id): TopLinkRelTool |
||
33 | { |
||
34 | $this->id = $id; |
||
35 | |||
36 | return $this; |
||
37 | } |
||
38 | |||
39 | public function getLink(): ?TopLink |
||
40 | { |
||
41 | return $this->link; |
||
42 | } |
||
43 | |||
44 | public function setLink(TopLink $link): static |
||
49 | } |
||
50 | |||
51 | public function getTool(): CTool |
||
54 | } |
||
55 | |||
56 | public function setTool(CTool $tool): static |
||
61 | } |
||
62 | } |
||
63 |