KnPostToPlotApplication   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 29
dl 0
loc 63
ccs 0
cts 17
cp 0
rs 10
c 0
b 0
f 0
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getKnPost() 0 3 1
A getRpgPlot() 0 3 1
A setRpgPlot() 0 5 1
A getId() 0 3 1
A getTime() 0 3 1
A setTime() 0 4 1
A setKnPost() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Orm\Entity;
6
7
use Doctrine\ORM\Mapping\Column;
8
use Doctrine\ORM\Mapping\Entity;
9
use Doctrine\ORM\Mapping\GeneratedValue;
10
use Doctrine\ORM\Mapping\Id;
11
use Doctrine\ORM\Mapping\JoinColumn;
12
use Doctrine\ORM\Mapping\ManyToOne;
13
use Doctrine\ORM\Mapping\Table;
14
use Stu\Orm\Repository\KnPostToPlotApplicationRepository;
15
16
#[Table(name: 'stu_kn_plot_application')]
17
#[Entity(repositoryClass: KnPostToPlotApplicationRepository::class)]
18
class KnPostToPlotApplication
19
{
20
    #[Id]
21
    #[Column(type: 'integer')]
22
    #[GeneratedValue(strategy: 'IDENTITY')]
23
    private int $id;
24
25
    #[Column(type: 'integer')]
26
    private int $post_id = 0;
0 ignored issues
show
introduced by
The private property $post_id is not used, and could be removed.
Loading history...
27
28
    #[Column(type: 'integer')]
29
    private int $plot_id = 0;
0 ignored issues
show
introduced by
The private property $plot_id is not used, and could be removed.
Loading history...
30
31
    #[Column(type: 'integer')]
32
    private int $time = 0;
33
34
    #[ManyToOne(targetEntity: KnPost::class)]
35
    #[JoinColumn(name: 'post_id', nullable: false, referencedColumnName: 'id', onDelete: 'CASCADE')]
36
    private KnPost $knPost;
37
38
    #[ManyToOne(targetEntity: RpgPlot::class)]
39
    #[JoinColumn(name: 'plot_id', nullable: false, referencedColumnName: 'id', onDelete: 'CASCADE')]
40
    private RpgPlot $rpgPlot;
41
42
    public function getId(): int
43
    {
44
        return $this->id;
45
    }
46
47
    public function getRpgPlot(): RpgPlot
48
    {
49
        return $this->rpgPlot;
50
    }
51
52
    public function setRpgPlot(RpgPlot $rpgPlot): KnPostToPlotApplication
53
    {
54
        $this->rpgPlot = $rpgPlot;
55
56
        return $this;
57
    }
58
59
    public function getKnPost(): KnPost
60
    {
61
        return $this->knPost;
62
    }
63
64
    public function setKnPost(KnPost $knPost): KnPostToPlotApplication
65
    {
66
        $this->knPost = $knPost;
67
68
        return $this;
69
    }
70
71
    public function getTime(): int
72
    {
73
        return $this->time;
74
    }
75
    public function setTime(int $time): KnPostToPlotApplication
76
    {
77
        $this->time = $time;
78
        return $this;
79
    }
80
}
81