Completed
Pull Request — master (#136)
by
unknown
12:23
created

Seat::getPriceCategory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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 extends AbstractPersonalTranslatable implements TranslatableInterface
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 integer
35
     * @Assert\NotBlank()
36
     *
37
     * @ORM\Column(name="row", type="integer")
38
     * @Type("integer")
39
     * @Expose()
40
     */
41
    protected $row;
42
43
    /**
44
     * @var integer
45
     * @Assert\NotBlank()
46
     *
47
     * @ORM\Column(name="place", type="integer")
48
     * @Type("integer")
49
     * @Expose()
50
     */
51
    protected $place;
52
53
    /**
54
     * @var VenueSector
55
     *
56
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\VenueSector", inversedBy="seats")
57
     * @Type("AppBundle\Entity\VenueSector")
58
     * @Expose()
59
     */
60
    protected $venueSector;
61
62
    /**
63
     * @return integer
64
     */
65
    public function getId()
66
    {
67
        return $this->id;
68
    }
69
70
71
    /**
72
     * @var ArrayCollection|Translation[]
73
     *
74
     * @ORM\OneToMany(
75
     *     targetEntity="AppBundle\Entity\Translations\SeatTranslation",
76
     *     mappedBy="object",
77
     *     cascade={"persist", "remove"}
78
     * )
79
     */
80
    protected $translations;
81
82
    /**
83
     * @return Seat
84
     */
85
    public function unsetTranslations()
86
    {
87
        $this->translations = null;
88
89
        return $this;
90
    }
91
92
    /**
93
     * @return int
94
     */
95
    public function getRow(): int
96
    {
97
        return $this->row;
98
    }
99
100
    /**
101
     * @param int $row
102
     */
103
    public function setRow(int $row)
104
    {
105
        $this->row = $row;
106
    }
107
108
    /**
109
     * @return int
110
     */
111
    public function getPlace(): int
112
    {
113
        return $this->place;
114
    }
115
116
    /**
117
     * @param int $place
118
     */
119
    public function setPlace(int $place)
120
    {
121
        $this->place = $place;
122
    }
123
124
    /**
125
     * @return VenueSector
126
     */
127
    public function getVenueSector(): VenueSector
128
    {
129
        return $this->venueSector;
130
    }
131
}
132