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
|
|
|
* @var PriceCategory |
64
|
|
|
* |
65
|
|
|
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\PriceCategory", inversedBy="seats") |
66
|
|
|
* @Type("AppBundle\Entity\PriceCategory") |
67
|
|
|
* @Expose() |
68
|
|
|
*/ |
69
|
|
|
protected $priceCategory; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @return integer |
73
|
|
|
*/ |
74
|
|
|
public function getId() |
75
|
|
|
{ |
76
|
|
|
return $this->id; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @var ArrayCollection|Translation[] |
82
|
|
|
* |
83
|
|
|
* @ORM\OneToMany( |
84
|
|
|
* targetEntity="AppBundle\Entity\Translations\SeatTranslation", |
85
|
|
|
* mappedBy="object", |
86
|
|
|
* cascade={"persist", "remove"} |
87
|
|
|
* ) |
88
|
|
|
*/ |
89
|
|
|
protected $translations; |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @return Seat |
93
|
|
|
*/ |
94
|
|
|
public function unsetTranslations() |
95
|
|
|
{ |
96
|
|
|
$this->translations = null; |
97
|
|
|
|
98
|
|
|
return $this; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @return int |
103
|
|
|
*/ |
104
|
|
|
public function getRow(): int |
105
|
|
|
{ |
106
|
|
|
return $this->row; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* @param int $row |
111
|
|
|
*/ |
112
|
|
|
public function setRow(int $row) |
113
|
|
|
{ |
114
|
|
|
$this->row = $row; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* @return int |
119
|
|
|
*/ |
120
|
|
|
public function getPlace(): int |
121
|
|
|
{ |
122
|
|
|
return $this->place; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @param int $place |
127
|
|
|
*/ |
128
|
|
|
public function setPlace(int $place) |
129
|
|
|
{ |
130
|
|
|
$this->place = $place; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* @return VenueSector |
135
|
|
|
*/ |
136
|
|
|
public function getVenueSector(): VenueSector |
137
|
|
|
{ |
138
|
|
|
return $this->venueSector; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* @return PriceCategory |
143
|
|
|
*/ |
144
|
|
|
public function getPriceCategory(): PriceCategory |
145
|
|
|
{ |
146
|
|
|
return $this->priceCategory; |
147
|
|
|
} |
148
|
|
|
} |
149
|
|
|
|