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 | * @Type("AppBundle\Entity\PerformanceEvent") |
||
94 | * @Expose() |
||
95 | */ |
||
96 | protected $performanceEvent; |
||
97 | |||
98 | /** |
||
99 | * @var VenueSector |
||
100 | * |
||
101 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\VenueSector", inversedBy="priceCategories") |
||
102 | * @Type("AppBundle\Entity\VenueSector") |
||
103 | * @Expose() |
||
104 | */ |
||
105 | protected $venueSector; |
||
106 | |||
107 | /** |
||
108 | * @return integer |
||
109 | */ |
||
110 | public function getId() |
||
114 | |||
115 | /** |
||
116 | * @return PriceCategory |
||
117 | */ |
||
118 | public function unsetTranslations() |
||
124 | |||
125 | /** |
||
126 | * @param string $color |
||
127 | * @return PriceCategory |
||
128 | */ |
||
129 | public function setColor($color = 'grey') |
||
135 | |||
136 | /** |
||
137 | * @return string |
||
138 | */ |
||
139 | public function getColor() |
||
143 | |||
144 | /** |
||
145 | * @return VenueSector |
||
146 | */ |
||
147 | public function getVenueSector() |
||
151 | |||
152 | /** |
||
153 | * @param VenueSector $venueSector |
||
154 | */ |
||
155 | public function setVenueSector(VenueSector $venueSector) |
||
159 | |||
160 | /** |
||
161 | * @return string |
||
162 | */ |
||
163 | public function getRows() |
||
167 | |||
168 | /** |
||
169 | * @param string $rows |
||
170 | */ |
||
171 | public function setRows(string $rows) |
||
175 | |||
176 | /** |
||
177 | * @return string |
||
178 | */ |
||
179 | public function getPlaces() |
||
183 | |||
184 | /** |
||
185 | * @param string $places |
||
186 | */ |
||
187 | public function setPlaces($places) |
||
191 | |||
192 | /** |
||
193 | * @return int |
||
194 | */ |
||
195 | public function getPrice() |
||
199 | |||
200 | /** |
||
201 | * @param int $price |
||
202 | */ |
||
203 | public function setPrice(int $price) |
||
207 | |||
208 | /** |
||
209 | * @return PerformanceEvent |
||
210 | */ |
||
211 | public function getPerformanceEvent() |
||
215 | |||
216 | /** |
||
217 | * @param PerformanceEvent $performanceEvent |
||
218 | */ |
||
219 | public function setPerformanceEvent(PerformanceEvent $performanceEvent) |
||
223 | |||
224 | /** |
||
225 | * @return mixed |
||
226 | */ |
||
227 | public function __toString() |
||
231 | } |
||
232 |