1 | <?php |
||
31 | class PerformanceEvent extends AbstractPersonalTranslatable implements TranslatableInterface |
||
32 | { |
||
33 | use TimestampableTrait, BlameableEntity, DeletedByTrait; |
||
34 | |||
35 | const VENUE_PHILHARMONIC = "venue-philharmonic"; |
||
36 | const VENUE_KULIC_HOUSE = "venue-kilic-house"; |
||
37 | const VENUE_THEATRE = "venue-theatre"; |
||
38 | const VENUE_SALUT = 'venue-salut'; |
||
39 | const VENUE_PALAC_MOLODI = 'venue-palac_molodi'; |
||
40 | const VENUE_CENTER_OF_KIDS_ARTS = 'venue-center_of_kids_arts'; |
||
41 | const VENUE_CHERKASY_ART_MUSEUM = 'venue-cherkasy-art-museum'; |
||
42 | const VENUE_NATIONS_FRIENDSHIP = 'venue-nations-friendship'; |
||
43 | |||
44 | public static $venues = [ |
||
45 | self::VENUE_PHILHARMONIC => self::VENUE_PHILHARMONIC, |
||
46 | self::VENUE_KULIC_HOUSE => self::VENUE_KULIC_HOUSE, |
||
47 | self::VENUE_THEATRE => self::VENUE_THEATRE, |
||
48 | self::VENUE_SALUT => self::VENUE_SALUT, |
||
49 | self::VENUE_PALAC_MOLODI => self::VENUE_PALAC_MOLODI, |
||
50 | self::VENUE_CENTER_OF_KIDS_ARTS => self::VENUE_CENTER_OF_KIDS_ARTS, |
||
51 | self::VENUE_CHERKASY_ART_MUSEUM => self::VENUE_CHERKASY_ART_MUSEUM, |
||
52 | self::VENUE_NATIONS_FRIENDSHIP => self::VENUE_NATIONS_FRIENDSHIP, |
||
53 | ]; |
||
54 | |||
55 | /** |
||
56 | * @var integer |
||
57 | * |
||
58 | * @ORM\Column(name="id", type="integer") |
||
59 | * @ORM\Id |
||
60 | * @ORM\GeneratedValue(strategy="AUTO") |
||
61 | * @Type("integer") |
||
62 | * @Expose |
||
63 | */ |
||
64 | private $id; |
||
65 | |||
66 | /** |
||
67 | * @var Performance |
||
68 | * |
||
69 | * @ORM\ManyToOne(targetEntity="App\Entity\Performance", inversedBy="performanceEvents") |
||
70 | * @Type("App\Entity\Performance") |
||
71 | * @Expose |
||
72 | */ |
||
73 | private $performance; |
||
74 | |||
75 | /** |
||
76 | * @var /Datetime |
||
77 | * |
||
78 | * @Assert\NotBlank() |
||
79 | * @ORM\Column(type="datetime") |
||
80 | * @Type("DateTime") |
||
81 | * @Expose |
||
82 | */ |
||
83 | private $dateTime; |
||
84 | |||
85 | /** |
||
86 | * Place where performance happens |
||
87 | * @var string |
||
88 | * @ORM\Column(type="string") |
||
89 | * @Type("string") |
||
90 | * @Expose |
||
91 | */ |
||
92 | private $venue; |
||
93 | |||
94 | /** |
||
95 | * @var int |
||
96 | * |
||
97 | * @Type("integer") |
||
98 | * @Expose |
||
99 | * @Accessor(getter="getYear") |
||
100 | */ |
||
101 | private $year; |
||
102 | |||
103 | /** |
||
104 | * @var int |
||
105 | * |
||
106 | * @Expose |
||
107 | * @Accessor(getter="getMonth") |
||
108 | */ |
||
109 | private $month; |
||
110 | |||
111 | /** |
||
112 | * @var int |
||
113 | * |
||
114 | * @Expose |
||
115 | * @Accessor(getter="getDay") |
||
116 | */ |
||
117 | private $day; |
||
118 | |||
119 | /** |
||
120 | * @var string |
||
121 | * |
||
122 | * @Expose |
||
123 | * @Accessor(getter="getTime") |
||
124 | */ |
||
125 | private $time; |
||
126 | |||
127 | /** |
||
128 | * @var string |
||
129 | * @ORM\Column(type="string", nullable=true) |
||
130 | * @Type("string") |
||
131 | * @Expose |
||
132 | */ |
||
133 | private $buyTicketLink; |
||
134 | |||
135 | /** |
||
136 | * @var ArrayCollection |
||
137 | * |
||
138 | * @ORM\OneToMany( |
||
139 | * targetEntity="App\Entity\Translations\PerformanceEventTranslation", |
||
140 | * mappedBy="object", |
||
141 | * cascade={"persist", "remove"} |
||
142 | * ) |
||
143 | */ |
||
144 | protected $translations; |
||
145 | |||
146 | /** |
||
147 | * Unset translations |
||
148 | * |
||
149 | * @return PerformanceEvent |
||
150 | */ |
||
151 | 3 | public function unsetTranslations() |
|
157 | |||
158 | /** |
||
159 | * Get id |
||
160 | * |
||
161 | * @return integer |
||
162 | */ |
||
163 | 10 | public function getId() |
|
167 | |||
168 | /** |
||
169 | * Set dateTime |
||
170 | * |
||
171 | * @param \DateTime $dateTime |
||
172 | * @return PerformanceEvent |
||
173 | */ |
||
174 | 1 | public function setDateTime($dateTime) |
|
180 | |||
181 | /** |
||
182 | * Get dateTime |
||
183 | * |
||
184 | * @return \DateTime |
||
185 | */ |
||
186 | 15 | public function getDateTime() |
|
190 | |||
191 | /** |
||
192 | * Set performance |
||
193 | * |
||
194 | * @param \App\Entity\Performance $performance |
||
195 | * @return PerformanceEvent |
||
196 | */ |
||
197 | 1 | public function setPerformance(\App\Entity\Performance $performance = null) |
|
203 | |||
204 | /** |
||
205 | * Get performance |
||
206 | * |
||
207 | * @return \App\Entity\Performance |
||
208 | */ |
||
209 | 6 | public function getPerformance() |
|
213 | |||
214 | 1 | public function __toString() |
|
222 | |||
223 | /** |
||
224 | * @return mixed |
||
225 | */ |
||
226 | 3 | public function getYear() |
|
230 | |||
231 | /** |
||
232 | * @param mixed $year |
||
233 | */ |
||
234 | public function setYear($year) |
||
238 | |||
239 | /** |
||
240 | * @return int |
||
241 | */ |
||
242 | 3 | public function getMonth() |
|
246 | |||
247 | /** |
||
248 | * @param int $month |
||
249 | */ |
||
250 | public function setMonth($month) |
||
254 | |||
255 | /** |
||
256 | * @return int |
||
257 | */ |
||
258 | 3 | public function getDay() |
|
262 | |||
263 | /** |
||
264 | * @param int $day |
||
265 | */ |
||
266 | public function setDay($day) |
||
270 | |||
271 | /** |
||
272 | * @return string |
||
273 | */ |
||
274 | 3 | public function getTime() |
|
278 | |||
279 | /** |
||
280 | * @param string $time |
||
281 | */ |
||
282 | public function setTime($time) |
||
286 | |||
287 | /** |
||
288 | * @return string |
||
289 | */ |
||
290 | 6 | public function getVenue() |
|
294 | |||
295 | 4 | public function setVenue(string $venue): self |
|
300 | |||
301 | 3 | public function getBuyTicketLink(): ?string |
|
305 | |||
306 | public function setBuyTicketLink(?string $buyTicketLink): self |
||
311 | } |
||
312 |