Completed
Pull Request — master (#132)
by
unknown
16:24 queued 10:13
created

Seat   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 136
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 136
ccs 0
cts 19
cp 0
rs 10
wmc 8
lcom 1
cbo 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A unsetTranslations() 0 6 1
A getRow() 0 4 1
A setRow() 0 4 1
A getPlace() 0 4 1
A setPlace() 0 4 1
A getVenueSector() 0 4 1
A getPriceCategory() 0 4 1
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
use Doctrine\ORM\Mapping as ORM;
7
use Gedmo\Mapping\Annotation as Gedmo;
8
use Gedmo\Translatable\Document\Translation;
9
use JMS\Serializer\Annotation\ExclusionPolicy;
10
use JMS\Serializer\Annotation\Expose;
11
use JMS\Serializer\Annotation\Type;
12
use Symfony\Component\Validator\Constraints as Assert;
13
use Sonata\TranslationBundle\Model\Gedmo\TranslatableInterface;
14
use Sonata\TranslationBundle\Model\Gedmo\AbstractPersonalTranslatable;
15
16
/**
17
 * @ORM\Table(name="seat")
18
 * @ORM\Entity(repositoryClass="AppBundle\Repository\SeatRepository")
19
 * @Gedmo\TranslationEntity(class="AppBundle\Entity\Translations\SeatTranslation")
20
 * @ExclusionPolicy("all")
21
 */
22
class Seat
23
{
24
    /**
25
     * @var integer
26
     *
27
     * @ORM\Column(name="id", type="integer")
28
     * @ORM\Id
29
     * @ORM\GeneratedValue(strategy="AUTO")
30
     */
31
    protected $id;
32
33
    /**
34
     * @var string
35
     * @Assert\NotBlank()
36
     * @ORM\Column(type="string", length=255)
37
     * @Type("string")
38
     * @Expose()
39
     */
40
    protected $uuid;
41
42
    /**
43
     * @var integer
44
     * @Assert\NotBlank()
45
     *
46
     * @ORM\Column(name="row", type="integer")
47
     * @Type("integer")
48
     * @Expose()
49
     */
50
    protected $row;
51
52
    /**
53
     * @var integer
54
     * @Assert\NotBlank()
55
     *
56
     * @ORM\Column(name="place", type="integer")
57
     * @Type("integer")
58
     * @Expose()
59
     */
60
    protected $place;
61
62
    /**
63
     * @var VenueSector
64
     *
65
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\VenueSector", inversedBy="seats")
66
     * @Type("AppBundle\Entity\Venue")
67
     * @Expose()
68
     */
69
    protected $venueSector;
70
71
    /**
72
     * @var PriceCategory
73
     *
74
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\PriceCategory", inversedBy="seats")
75
     * @Type("AppBundle\Entity\Venue")
76
     * @Expose()
77
     */
78
    protected $priceCategory;
79
80
    /**
81
     * @return integer
82
     */
83
    public function getId()
84
    {
85
        return $this->id;
86
    }
87
88
89
    /**
90
     * @var ArrayCollection|Translation[]
91
     *
92
     * @ORM\OneToMany(
93
     *     targetEntity="AppBundle\Entity\Translations\SeatTranslation",
94
     *     mappedBy="object",
95
     *     cascade={"persist", "remove"}
96
     * )
97
     */
98
    protected $translations;
99
100
    /**
101
     * @return Seat
102
     */
103
    public function unsetTranslations()
104
    {
105
        $this->translations = null;
106
107
        return $this;
108
    }
109
110
    /**
111
     * @return int
112
     */
113
    public function getRow(): int
114
    {
115
        return $this->row;
116
    }
117
118
    /**
119
     * @param int $row
120
     */
121
    public function setRow(int $row)
122
    {
123
        $this->row = $row;
124
    }
125
126
    /**
127
     * @return int
128
     */
129
    public function getPlace(): int
130
    {
131
        return $this->place;
132
    }
133
134
    /**
135
     * @param int $place
136
     */
137
    public function setPlace(int $place)
138
    {
139
        $this->place = $place;
140
    }
141
142
    /**
143
     * @return VenueSector
144
     */
145
    public function getVenueSector(): VenueSector
146
    {
147
        return $this->venueSector;
148
    }
149
150
    /**
151
     * @return PriceCategory
152
     */
153
    public function getPriceCategory(): PriceCategory
154
    {
155
        return $this->priceCategory;
156
    }
157
}
158