1 | <?php |
||
23 | class PriceCategory extends AbstractPersonalTranslatable implements TranslatableInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var integer |
||
27 | * |
||
28 | * @ORM\Column(name="id", type="integer") |
||
29 | * @ORM\Id |
||
30 | * @ORM\GeneratedValue(strategy="AUTO") |
||
31 | */ |
||
32 | protected $id; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | * @Assert\NotBlank() |
||
37 | * @Assert\Regex( |
||
38 | * pattern = "/^\d+(-\d+)?(,\d+(-\d+)?)*$/", |
||
39 | * htmlPattern = "^\d+(-\d+)?(,\d+(-\d+)?)*$" |
||
40 | * ) |
||
41 | * @ORM\Column(type="string", length=255) |
||
42 | * @Serializer\Groups({"get_ticket"}) |
||
43 | * @Type("string") |
||
44 | * @Expose() |
||
45 | */ |
||
46 | protected $rows; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | * @Assert\Regex( |
||
51 | * pattern = "/^\d+(-\d+)?(,\d+(-\d+)?)*$/", |
||
52 | * htmlPattern = "^\d+(-\d+)?(,\d+(-\d+)?)*$" |
||
53 | * ) |
||
54 | * @ORM\Column(type="string", length=255, nullable=true) |
||
55 | * @Type("string") |
||
56 | * @Serializer\Groups({"get_ticket"}) |
||
57 | * @Expose() |
||
58 | */ |
||
59 | protected $places; |
||
60 | /** |
||
61 | * @var string |
||
62 | * @Assert\NotBlank() |
||
63 | * @ORM\Column(type="string", length=255, options={"default" : "gray"}) |
||
64 | * @Type("string") |
||
65 | * @Expose() |
||
66 | */ |
||
67 | protected $color; |
||
68 | |||
69 | /** |
||
70 | * @var integer |
||
71 | * @Assert\NotBlank() |
||
72 | * @ORM\Column(type="integer", nullable=false) |
||
73 | * @Type("integer") |
||
74 | * @Expose() |
||
75 | */ |
||
76 | protected $price; |
||
77 | |||
78 | /** |
||
79 | * @var ArrayCollection|Translation[] |
||
80 | * |
||
81 | * @ORM\OneToMany( |
||
82 | * targetEntity="AppBundle\Entity\Translations\PriceCategoryTranslation", |
||
83 | * mappedBy="object", |
||
84 | * cascade={"persist", "remove"} |
||
85 | * ) |
||
86 | */ |
||
87 | protected $translations; |
||
88 | |||
89 | /** |
||
90 | * @var PerformanceEvent |
||
91 | * |
||
92 | * @ORM\ManyToOne( |
||
93 | * targetEntity="AppBundle\Entity\PerformanceEvent", |
||
94 | * inversedBy="priceCategories", |
||
95 | * cascade={"persist"} |
||
96 | * ) |
||
97 | */ |
||
98 | protected $performanceEvent; |
||
99 | |||
100 | /** |
||
101 | * @var VenueSector |
||
102 | * |
||
103 | * @Serializer\SerializedName("venueSector_id") |
||
104 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\VenueSector") |
||
105 | * @Type("AppBundle\Entity\VenueSector") |
||
106 | * @Expose() |
||
107 | */ |
||
108 | protected $venueSector; |
||
109 | |||
110 | /** |
||
111 | * @return integer |
||
112 | */ |
||
113 | public function getId() |
||
117 | |||
118 | /** |
||
119 | * @return PriceCategory |
||
120 | */ |
||
121 | public function unsetTranslations() |
||
127 | |||
128 | /** |
||
129 | * @param string $color |
||
130 | * @return PriceCategory |
||
131 | */ |
||
132 | public function setColor($color = 'grey') |
||
138 | |||
139 | /** |
||
140 | * @return string |
||
141 | */ |
||
142 | public function getColor() |
||
146 | |||
147 | /** |
||
148 | * @return VenueSector |
||
149 | */ |
||
150 | public function getVenueSector() |
||
154 | |||
155 | /** |
||
156 | * @param VenueSector $venueSector |
||
157 | */ |
||
158 | public function setVenueSector(VenueSector $venueSector) |
||
162 | |||
163 | /** |
||
164 | * @return string |
||
165 | */ |
||
166 | public function getRows() |
||
170 | |||
171 | /** |
||
172 | * @param string $rows |
||
173 | */ |
||
174 | public function setRows(string $rows) |
||
178 | |||
179 | /** |
||
180 | * @return string |
||
181 | */ |
||
182 | public function getPlaces() |
||
186 | |||
187 | /** |
||
188 | * @param string $places |
||
189 | */ |
||
190 | public function setPlaces($places) |
||
194 | |||
195 | /** |
||
196 | * @return int |
||
197 | */ |
||
198 | public function getPrice() |
||
202 | |||
203 | /** |
||
204 | * @param int $price |
||
205 | */ |
||
206 | public function setPrice(int $price) |
||
210 | |||
211 | /** |
||
212 | * @return PerformanceEvent |
||
213 | */ |
||
214 | public function getPerformanceEvent() |
||
218 | |||
219 | /** |
||
220 | * @param PerformanceEvent $performanceEvent |
||
221 | */ |
||
222 | public function setPerformanceEvent(PerformanceEvent $performanceEvent) |
||
226 | |||
227 | /** |
||
228 | * @return mixed |
||
229 | */ |
||
230 | public function __toString() |
||
234 | } |
||
235 |