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(targetEntity="AppBundle\Entity\PerformanceEvent", inversedBy="priceCategories") |
||
93 | */ |
||
94 | protected $performanceEvent; |
||
95 | |||
96 | /** |
||
97 | * @var VenueSector |
||
98 | * |
||
99 | * @Serializer\SerializedName("venueSector_id") |
||
100 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\VenueSector") |
||
101 | * @Type("AppBundle\Entity\VenueSector") |
||
102 | * @Expose() |
||
103 | */ |
||
104 | protected $venueSector; |
||
105 | |||
106 | /** |
||
107 | * @return integer |
||
108 | */ |
||
109 | public function getId() |
||
113 | |||
114 | /** |
||
115 | * @return PriceCategory |
||
116 | */ |
||
117 | public function unsetTranslations() |
||
123 | |||
124 | /** |
||
125 | * @param string $color |
||
126 | * @return PriceCategory |
||
127 | */ |
||
128 | public function setColor($color = 'grey') |
||
134 | |||
135 | /** |
||
136 | * @return string |
||
137 | */ |
||
138 | public function getColor() |
||
142 | |||
143 | /** |
||
144 | * @return VenueSector |
||
145 | */ |
||
146 | public function getVenueSector() |
||
150 | |||
151 | /** |
||
152 | * @param VenueSector $venueSector |
||
153 | */ |
||
154 | public function setVenueSector(VenueSector $venueSector) |
||
158 | |||
159 | /** |
||
160 | * @return string |
||
161 | */ |
||
162 | public function getRows() |
||
166 | |||
167 | /** |
||
168 | * @param string $rows |
||
169 | */ |
||
170 | public function setRows(string $rows) |
||
174 | |||
175 | /** |
||
176 | * @return string |
||
177 | */ |
||
178 | public function getPlaces() |
||
182 | |||
183 | /** |
||
184 | * @param string $places |
||
185 | */ |
||
186 | public function setPlaces($places) |
||
190 | |||
191 | /** |
||
192 | * @return int |
||
193 | */ |
||
194 | public function getPrice() |
||
198 | |||
199 | /** |
||
200 | * @param int $price |
||
201 | */ |
||
202 | public function setPrice(int $price) |
||
206 | |||
207 | /** |
||
208 | * @return PerformanceEvent |
||
209 | */ |
||
210 | public function getPerformanceEvent() |
||
214 | |||
215 | /** |
||
216 | * @param PerformanceEvent $performanceEvent |
||
217 | */ |
||
218 | public function setPerformanceEvent(PerformanceEvent $performanceEvent) |
||
222 | |||
223 | /** |
||
224 | * @return mixed |
||
225 | */ |
||
226 | public function __toString() |
||
230 | } |
||
231 |