1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* This file is part of the Zemit Framework. |
4
|
|
|
* |
5
|
|
|
* (c) Zemit Team <[email protected]> |
6
|
|
|
* |
7
|
|
|
* For the full copyright and license information, please view the LICENSE.txt |
8
|
|
|
* file that was distributed with this source code. |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
declare(strict_types=1); |
12
|
|
|
|
13
|
|
|
namespace Zemit\Models\Abstracts; |
14
|
|
|
|
15
|
|
|
use Phalcon\Db\RawValue; |
16
|
|
|
use Zemit\Filter\Validation; |
17
|
|
|
use Zemit\Models\AbstractModel; |
18
|
|
|
use Zemit\Models\Flag; |
19
|
|
|
use Zemit\Models\Site; |
20
|
|
|
use Zemit\Models\Lang; |
21
|
|
|
use Zemit\Models\Meta; |
22
|
|
|
use Zemit\Models\Post; |
23
|
|
|
use Zemit\Models\Category; |
24
|
|
|
use Zemit\Models\Translate; |
25
|
|
|
use Zemit\Models\User; |
26
|
|
|
use Zemit\Models\Abstracts\Interfaces\PageAbstractInterface; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Class PageAbstract |
30
|
|
|
* |
31
|
|
|
* This class defines a Page abstract model that extends the AbstractModel class and implements the PageAbstractInterface. |
32
|
|
|
* It provides properties and methods for managing Page data. |
33
|
|
|
* |
34
|
|
|
* @property Flag[] $flaglist |
35
|
|
|
* @property Flag[] $FlagList |
36
|
|
|
* @method Flag[] getFlagList(?array $params = null) |
37
|
|
|
* |
38
|
|
|
* @property Site[] $flagsitelist |
39
|
|
|
* @property Site[] $FlagSiteList |
40
|
|
|
* @method Site[] getFlagSiteList(?array $params = null) |
41
|
|
|
* |
42
|
|
|
* @property Lang[] $flaglanglist |
43
|
|
|
* @property Lang[] $FlagLangList |
44
|
|
|
* @method Lang[] getFlagLangList(?array $params = null) |
45
|
|
|
* |
46
|
|
|
* @property Meta[] $metalist |
47
|
|
|
* @property Meta[] $MetaList |
48
|
|
|
* @method Meta[] getMetaList(?array $params = null) |
49
|
|
|
* |
50
|
|
|
* @property Lang[] $metalanglist |
51
|
|
|
* @property Lang[] $MetaLangList |
52
|
|
|
* @method Lang[] getMetaLangList(?array $params = null) |
53
|
|
|
* |
54
|
|
|
* @property Site[] $metasitelist |
55
|
|
|
* @property Site[] $MetaSiteList |
56
|
|
|
* @method Site[] getMetaSiteList(?array $params = null) |
57
|
|
|
* |
58
|
|
|
* @property Post[] $metapostlist |
59
|
|
|
* @property Post[] $MetaPostList |
60
|
|
|
* @method Post[] getMetaPostList(?array $params = null) |
61
|
|
|
* |
62
|
|
|
* @property Category[] $metacategorylist |
63
|
|
|
* @property Category[] $MetaCategoryList |
64
|
|
|
* @method Category[] getMetaCategoryList(?array $params = null) |
65
|
|
|
* |
66
|
|
|
* @property Post[] $postlist |
67
|
|
|
* @property Post[] $PostList |
68
|
|
|
* @method Post[] getPostList(?array $params = null) |
69
|
|
|
* |
70
|
|
|
* @property Lang[] $postlanglist |
71
|
|
|
* @property Lang[] $PostLangList |
72
|
|
|
* @method Lang[] getPostLangList(?array $params = null) |
73
|
|
|
* |
74
|
|
|
* @property Site[] $postsitelist |
75
|
|
|
* @property Site[] $PostSiteList |
76
|
|
|
* @method Site[] getPostSiteList(?array $params = null) |
77
|
|
|
* |
78
|
|
|
* @property Translate[] $translatelist |
79
|
|
|
* @property Translate[] $TranslateList |
80
|
|
|
* @method Translate[] getTranslateList(?array $params = null) |
81
|
|
|
* |
82
|
|
|
* @property Lang[] $translatelanglist |
83
|
|
|
* @property Lang[] $TranslateLangList |
84
|
|
|
* @method Lang[] getTranslateLangList(?array $params = null) |
85
|
|
|
* |
86
|
|
|
* @property Site[] $translatesitelist |
87
|
|
|
* @property Site[] $TranslateSiteList |
88
|
|
|
* @method Site[] getTranslateSiteList(?array $params = null) |
89
|
|
|
* |
90
|
|
|
* @property Post[] $translatepostlist |
91
|
|
|
* @property Post[] $TranslatePostList |
92
|
|
|
* @method Post[] getTranslatePostList(?array $params = null) |
93
|
|
|
* |
94
|
|
|
* @property Category[] $translatecategorylist |
95
|
|
|
* @property Category[] $TranslateCategoryList |
96
|
|
|
* @method Category[] getTranslateCategoryList(?array $params = null) |
97
|
|
|
* |
98
|
|
|
* @property Lang $langentity |
99
|
|
|
* @property Lang $LangEntity |
100
|
|
|
* @method Lang getLangEntity(?array $params = null) |
101
|
|
|
* |
102
|
|
|
* @property Site $siteentity |
103
|
|
|
* @property Site $SiteEntity |
104
|
|
|
* @method Site getSiteEntity(?array $params = null) |
105
|
|
|
* |
106
|
|
|
* @property User $createdbyentity |
107
|
|
|
* @property User $CreatedByEntity |
108
|
|
|
* @method User getCreatedByEntity(?array $params = null) |
109
|
|
|
* |
110
|
|
|
* @property User $createdasentity |
111
|
|
|
* @property User $CreatedAsEntity |
112
|
|
|
* @method User getCreatedAsEntity(?array $params = null) |
113
|
|
|
* |
114
|
|
|
* @property User $updatedbyentity |
115
|
|
|
* @property User $UpdatedByEntity |
116
|
|
|
* @method User getUpdatedByEntity(?array $params = null) |
117
|
|
|
* |
118
|
|
|
* @property User $updatedasentity |
119
|
|
|
* @property User $UpdatedAsEntity |
120
|
|
|
* @method User getUpdatedAsEntity(?array $params = null) |
121
|
|
|
* |
122
|
|
|
* @property User $deletedasentity |
123
|
|
|
* @property User $DeletedAsEntity |
124
|
|
|
* @method User getDeletedAsEntity(?array $params = null) |
125
|
|
|
* |
126
|
|
|
* @property User $deletedbyentity |
127
|
|
|
* @property User $DeletedByEntity |
128
|
|
|
* @method User getDeletedByEntity(?array $params = null) |
129
|
|
|
* |
130
|
|
|
* @property User $restoredbyentity |
131
|
|
|
* @property User $RestoredByEntity |
132
|
|
|
* @method User getRestoredByEntity(?array $params = null) |
133
|
|
|
* |
134
|
|
|
* @property User $restoredasentity |
135
|
|
|
* @property User $RestoredAsEntity |
136
|
|
|
* @method User getRestoredAsEntity(?array $params = null) |
137
|
|
|
*/ |
138
|
|
|
abstract class PageAbstract extends AbstractModel implements PageAbstractInterface |
139
|
|
|
{ |
140
|
|
|
/** |
141
|
|
|
* Column: id |
142
|
|
|
* Attributes: First | Primary | NotNull | Numeric | Unsigned | AutoIncrement |
143
|
|
|
* @var mixed |
144
|
|
|
*/ |
145
|
|
|
public mixed $id = null; |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* Column: lang_id |
149
|
|
|
* Attributes: Numeric | Unsigned |
150
|
|
|
* @var mixed |
151
|
|
|
*/ |
152
|
|
|
public mixed $langId = null; |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* Column: site_id |
156
|
|
|
* Attributes: NotNull | Numeric | Unsigned |
157
|
|
|
* @var mixed |
158
|
|
|
*/ |
159
|
|
|
public mixed $siteId = null; |
160
|
|
|
|
161
|
|
|
/** |
162
|
|
|
* Column: name |
163
|
|
|
* Attributes: NotNull | Size(255) | Type(2) |
164
|
|
|
* @var mixed |
165
|
|
|
*/ |
166
|
|
|
public mixed $name = null; |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* Column: description |
170
|
|
|
* Attributes: Size(255) | Type(2) |
171
|
|
|
* @var mixed |
172
|
|
|
*/ |
173
|
|
|
public mixed $description = null; |
174
|
|
|
|
175
|
|
|
/** |
176
|
|
|
* Column: deleted |
177
|
|
|
* Attributes: NotNull | Numeric | Unsigned | Type(26) |
178
|
|
|
* @var mixed |
179
|
|
|
*/ |
180
|
|
|
public mixed $deleted = 0; |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* Column: created_at |
184
|
|
|
* Attributes: NotNull | Type(4) |
185
|
|
|
* @var mixed |
186
|
|
|
*/ |
187
|
|
|
public mixed $createdAt = null; |
188
|
|
|
|
189
|
|
|
/** |
190
|
|
|
* Column: created_by |
191
|
|
|
* Attributes: Numeric | Unsigned |
192
|
|
|
* @var mixed |
193
|
|
|
*/ |
194
|
|
|
public mixed $createdBy = null; |
195
|
|
|
|
196
|
|
|
/** |
197
|
|
|
* Column: created_as |
198
|
|
|
* Attributes: Numeric | Unsigned |
199
|
|
|
* @var mixed |
200
|
|
|
*/ |
201
|
|
|
public mixed $createdAs = null; |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* Column: updated_at |
205
|
|
|
* Attributes: Type(4) |
206
|
|
|
* @var mixed |
207
|
|
|
*/ |
208
|
|
|
public mixed $updatedAt = null; |
209
|
|
|
|
210
|
|
|
/** |
211
|
|
|
* Column: updated_by |
212
|
|
|
* Attributes: Numeric | Unsigned |
213
|
|
|
* @var mixed |
214
|
|
|
*/ |
215
|
|
|
public mixed $updatedBy = null; |
216
|
|
|
|
217
|
|
|
/** |
218
|
|
|
* Column: updated_as |
219
|
|
|
* Attributes: Numeric | Unsigned |
220
|
|
|
* @var mixed |
221
|
|
|
*/ |
222
|
|
|
public mixed $updatedAs = null; |
223
|
|
|
|
224
|
|
|
/** |
225
|
|
|
* Column: deleted_at |
226
|
|
|
* Attributes: Type(4) |
227
|
|
|
* @var mixed |
228
|
|
|
*/ |
229
|
|
|
public mixed $deletedAt = null; |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* Column: deleted_as |
233
|
|
|
* Attributes: Numeric | Unsigned |
234
|
|
|
* @var mixed |
235
|
|
|
*/ |
236
|
|
|
public mixed $deletedAs = null; |
237
|
|
|
|
238
|
|
|
/** |
239
|
|
|
* Column: deleted_by |
240
|
|
|
* Attributes: Numeric | Unsigned |
241
|
|
|
* @var mixed |
242
|
|
|
*/ |
243
|
|
|
public mixed $deletedBy = null; |
244
|
|
|
|
245
|
|
|
/** |
246
|
|
|
* Column: restored_at |
247
|
|
|
* Attributes: Type(4) |
248
|
|
|
* @var mixed |
249
|
|
|
*/ |
250
|
|
|
public mixed $restoredAt = null; |
251
|
|
|
|
252
|
|
|
/** |
253
|
|
|
* Column: restored_by |
254
|
|
|
* Attributes: Numeric | Unsigned |
255
|
|
|
* @var mixed |
256
|
|
|
*/ |
257
|
|
|
public mixed $restoredBy = null; |
258
|
|
|
|
259
|
|
|
/** |
260
|
|
|
* Column: restored_as |
261
|
|
|
* Attributes: Numeric | Unsigned |
262
|
|
|
* @var mixed |
263
|
|
|
*/ |
264
|
|
|
public mixed $restoredAs = null; |
265
|
|
|
|
266
|
|
|
/** |
267
|
|
|
* Returns the value of field id |
268
|
|
|
* Column: id |
269
|
|
|
* Attributes: First | Primary | NotNull | Numeric | Unsigned | AutoIncrement |
270
|
|
|
* @return mixed |
271
|
|
|
*/ |
272
|
|
|
public function getId(): mixed |
273
|
|
|
{ |
274
|
|
|
return $this->id; |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
/** |
278
|
|
|
* Sets the value of field id |
279
|
|
|
* Column: id |
280
|
|
|
* Attributes: First | Primary | NotNull | Numeric | Unsigned | AutoIncrement |
281
|
|
|
* @param mixed $id |
282
|
|
|
* @return void |
283
|
|
|
*/ |
284
|
|
|
public function setId(mixed $id): void |
285
|
|
|
{ |
286
|
|
|
$this->id = $id; |
287
|
|
|
} |
288
|
|
|
|
289
|
|
|
/** |
290
|
|
|
* Returns the value of field langId |
291
|
|
|
* Column: lang_id |
292
|
|
|
* Attributes: Numeric | Unsigned |
293
|
|
|
* @return mixed |
294
|
|
|
*/ |
295
|
|
|
public function getLangId(): mixed |
296
|
|
|
{ |
297
|
|
|
return $this->langId; |
298
|
|
|
} |
299
|
|
|
|
300
|
|
|
/** |
301
|
|
|
* Sets the value of field langId |
302
|
|
|
* Column: lang_id |
303
|
|
|
* Attributes: Numeric | Unsigned |
304
|
|
|
* @param mixed $langId |
305
|
|
|
* @return void |
306
|
|
|
*/ |
307
|
|
|
public function setLangId(mixed $langId): void |
308
|
|
|
{ |
309
|
|
|
$this->langId = $langId; |
310
|
|
|
} |
311
|
|
|
|
312
|
|
|
/** |
313
|
|
|
* Returns the value of field siteId |
314
|
|
|
* Column: site_id |
315
|
|
|
* Attributes: NotNull | Numeric | Unsigned |
316
|
|
|
* @return mixed |
317
|
|
|
*/ |
318
|
|
|
public function getSiteId(): mixed |
319
|
|
|
{ |
320
|
|
|
return $this->siteId; |
321
|
|
|
} |
322
|
|
|
|
323
|
|
|
/** |
324
|
|
|
* Sets the value of field siteId |
325
|
|
|
* Column: site_id |
326
|
|
|
* Attributes: NotNull | Numeric | Unsigned |
327
|
|
|
* @param mixed $siteId |
328
|
|
|
* @return void |
329
|
|
|
*/ |
330
|
|
|
public function setSiteId(mixed $siteId): void |
331
|
|
|
{ |
332
|
|
|
$this->siteId = $siteId; |
333
|
|
|
} |
334
|
|
|
|
335
|
|
|
/** |
336
|
|
|
* Returns the value of field name |
337
|
|
|
* Column: name |
338
|
|
|
* Attributes: NotNull | Size(255) | Type(2) |
339
|
|
|
* @return mixed |
340
|
|
|
*/ |
341
|
|
|
public function getName(): mixed |
342
|
|
|
{ |
343
|
|
|
return $this->name; |
344
|
|
|
} |
345
|
|
|
|
346
|
|
|
/** |
347
|
|
|
* Sets the value of field name |
348
|
|
|
* Column: name |
349
|
|
|
* Attributes: NotNull | Size(255) | Type(2) |
350
|
|
|
* @param mixed $name |
351
|
|
|
* @return void |
352
|
|
|
*/ |
353
|
|
|
public function setName(mixed $name): void |
354
|
|
|
{ |
355
|
|
|
$this->name = $name; |
356
|
|
|
} |
357
|
|
|
|
358
|
|
|
/** |
359
|
|
|
* Returns the value of field description |
360
|
|
|
* Column: description |
361
|
|
|
* Attributes: Size(255) | Type(2) |
362
|
|
|
* @return mixed |
363
|
|
|
*/ |
364
|
|
|
public function getDescription(): mixed |
365
|
|
|
{ |
366
|
|
|
return $this->description; |
367
|
|
|
} |
368
|
|
|
|
369
|
|
|
/** |
370
|
|
|
* Sets the value of field description |
371
|
|
|
* Column: description |
372
|
|
|
* Attributes: Size(255) | Type(2) |
373
|
|
|
* @param mixed $description |
374
|
|
|
* @return void |
375
|
|
|
*/ |
376
|
|
|
public function setDescription(mixed $description): void |
377
|
|
|
{ |
378
|
|
|
$this->description = $description; |
379
|
|
|
} |
380
|
|
|
|
381
|
|
|
/** |
382
|
|
|
* Returns the value of field deleted |
383
|
|
|
* Column: deleted |
384
|
|
|
* Attributes: NotNull | Numeric | Unsigned | Type(26) |
385
|
|
|
* @return mixed |
386
|
|
|
*/ |
387
|
|
|
public function getDeleted(): mixed |
388
|
|
|
{ |
389
|
|
|
return $this->deleted; |
390
|
|
|
} |
391
|
|
|
|
392
|
|
|
/** |
393
|
|
|
* Sets the value of field deleted |
394
|
|
|
* Column: deleted |
395
|
|
|
* Attributes: NotNull | Numeric | Unsigned | Type(26) |
396
|
|
|
* @param mixed $deleted |
397
|
|
|
* @return void |
398
|
|
|
*/ |
399
|
|
|
public function setDeleted(mixed $deleted): void |
400
|
|
|
{ |
401
|
|
|
$this->deleted = $deleted; |
402
|
|
|
} |
403
|
|
|
|
404
|
|
|
/** |
405
|
|
|
* Returns the value of field createdAt |
406
|
|
|
* Column: created_at |
407
|
|
|
* Attributes: NotNull | Type(4) |
408
|
|
|
* @return mixed |
409
|
|
|
*/ |
410
|
|
|
public function getCreatedAt(): mixed |
411
|
|
|
{ |
412
|
|
|
return $this->createdAt; |
413
|
|
|
} |
414
|
|
|
|
415
|
|
|
/** |
416
|
|
|
* Sets the value of field createdAt |
417
|
|
|
* Column: created_at |
418
|
|
|
* Attributes: NotNull | Type(4) |
419
|
|
|
* @param mixed $createdAt |
420
|
|
|
* @return void |
421
|
|
|
*/ |
422
|
|
|
public function setCreatedAt(mixed $createdAt): void |
423
|
|
|
{ |
424
|
|
|
$this->createdAt = $createdAt; |
425
|
|
|
} |
426
|
|
|
|
427
|
|
|
/** |
428
|
|
|
* Returns the value of field createdBy |
429
|
|
|
* Column: created_by |
430
|
|
|
* Attributes: Numeric | Unsigned |
431
|
|
|
* @return mixed |
432
|
|
|
*/ |
433
|
|
|
public function getCreatedBy(): mixed |
434
|
|
|
{ |
435
|
|
|
return $this->createdBy; |
436
|
|
|
} |
437
|
|
|
|
438
|
|
|
/** |
439
|
|
|
* Sets the value of field createdBy |
440
|
|
|
* Column: created_by |
441
|
|
|
* Attributes: Numeric | Unsigned |
442
|
|
|
* @param mixed $createdBy |
443
|
|
|
* @return void |
444
|
|
|
*/ |
445
|
|
|
public function setCreatedBy(mixed $createdBy): void |
446
|
|
|
{ |
447
|
|
|
$this->createdBy = $createdBy; |
448
|
|
|
} |
449
|
|
|
|
450
|
|
|
/** |
451
|
|
|
* Returns the value of field createdAs |
452
|
|
|
* Column: created_as |
453
|
|
|
* Attributes: Numeric | Unsigned |
454
|
|
|
* @return mixed |
455
|
|
|
*/ |
456
|
|
|
public function getCreatedAs(): mixed |
457
|
|
|
{ |
458
|
|
|
return $this->createdAs; |
459
|
|
|
} |
460
|
|
|
|
461
|
|
|
/** |
462
|
|
|
* Sets the value of field createdAs |
463
|
|
|
* Column: created_as |
464
|
|
|
* Attributes: Numeric | Unsigned |
465
|
|
|
* @param mixed $createdAs |
466
|
|
|
* @return void |
467
|
|
|
*/ |
468
|
|
|
public function setCreatedAs(mixed $createdAs): void |
469
|
|
|
{ |
470
|
|
|
$this->createdAs = $createdAs; |
471
|
|
|
} |
472
|
|
|
|
473
|
|
|
/** |
474
|
|
|
* Returns the value of field updatedAt |
475
|
|
|
* Column: updated_at |
476
|
|
|
* Attributes: Type(4) |
477
|
|
|
* @return mixed |
478
|
|
|
*/ |
479
|
|
|
public function getUpdatedAt(): mixed |
480
|
|
|
{ |
481
|
|
|
return $this->updatedAt; |
482
|
|
|
} |
483
|
|
|
|
484
|
|
|
/** |
485
|
|
|
* Sets the value of field updatedAt |
486
|
|
|
* Column: updated_at |
487
|
|
|
* Attributes: Type(4) |
488
|
|
|
* @param mixed $updatedAt |
489
|
|
|
* @return void |
490
|
|
|
*/ |
491
|
|
|
public function setUpdatedAt(mixed $updatedAt): void |
492
|
|
|
{ |
493
|
|
|
$this->updatedAt = $updatedAt; |
494
|
|
|
} |
495
|
|
|
|
496
|
|
|
/** |
497
|
|
|
* Returns the value of field updatedBy |
498
|
|
|
* Column: updated_by |
499
|
|
|
* Attributes: Numeric | Unsigned |
500
|
|
|
* @return mixed |
501
|
|
|
*/ |
502
|
|
|
public function getUpdatedBy(): mixed |
503
|
|
|
{ |
504
|
|
|
return $this->updatedBy; |
505
|
|
|
} |
506
|
|
|
|
507
|
|
|
/** |
508
|
|
|
* Sets the value of field updatedBy |
509
|
|
|
* Column: updated_by |
510
|
|
|
* Attributes: Numeric | Unsigned |
511
|
|
|
* @param mixed $updatedBy |
512
|
|
|
* @return void |
513
|
|
|
*/ |
514
|
|
|
public function setUpdatedBy(mixed $updatedBy): void |
515
|
|
|
{ |
516
|
|
|
$this->updatedBy = $updatedBy; |
517
|
|
|
} |
518
|
|
|
|
519
|
|
|
/** |
520
|
|
|
* Returns the value of field updatedAs |
521
|
|
|
* Column: updated_as |
522
|
|
|
* Attributes: Numeric | Unsigned |
523
|
|
|
* @return mixed |
524
|
|
|
*/ |
525
|
|
|
public function getUpdatedAs(): mixed |
526
|
|
|
{ |
527
|
|
|
return $this->updatedAs; |
528
|
|
|
} |
529
|
|
|
|
530
|
|
|
/** |
531
|
|
|
* Sets the value of field updatedAs |
532
|
|
|
* Column: updated_as |
533
|
|
|
* Attributes: Numeric | Unsigned |
534
|
|
|
* @param mixed $updatedAs |
535
|
|
|
* @return void |
536
|
|
|
*/ |
537
|
|
|
public function setUpdatedAs(mixed $updatedAs): void |
538
|
|
|
{ |
539
|
|
|
$this->updatedAs = $updatedAs; |
540
|
|
|
} |
541
|
|
|
|
542
|
|
|
/** |
543
|
|
|
* Returns the value of field deletedAt |
544
|
|
|
* Column: deleted_at |
545
|
|
|
* Attributes: Type(4) |
546
|
|
|
* @return mixed |
547
|
|
|
*/ |
548
|
|
|
public function getDeletedAt(): mixed |
549
|
|
|
{ |
550
|
|
|
return $this->deletedAt; |
551
|
|
|
} |
552
|
|
|
|
553
|
|
|
/** |
554
|
|
|
* Sets the value of field deletedAt |
555
|
|
|
* Column: deleted_at |
556
|
|
|
* Attributes: Type(4) |
557
|
|
|
* @param mixed $deletedAt |
558
|
|
|
* @return void |
559
|
|
|
*/ |
560
|
|
|
public function setDeletedAt(mixed $deletedAt): void |
561
|
|
|
{ |
562
|
|
|
$this->deletedAt = $deletedAt; |
563
|
|
|
} |
564
|
|
|
|
565
|
|
|
/** |
566
|
|
|
* Returns the value of field deletedAs |
567
|
|
|
* Column: deleted_as |
568
|
|
|
* Attributes: Numeric | Unsigned |
569
|
|
|
* @return mixed |
570
|
|
|
*/ |
571
|
|
|
public function getDeletedAs(): mixed |
572
|
|
|
{ |
573
|
|
|
return $this->deletedAs; |
574
|
|
|
} |
575
|
|
|
|
576
|
|
|
/** |
577
|
|
|
* Sets the value of field deletedAs |
578
|
|
|
* Column: deleted_as |
579
|
|
|
* Attributes: Numeric | Unsigned |
580
|
|
|
* @param mixed $deletedAs |
581
|
|
|
* @return void |
582
|
|
|
*/ |
583
|
|
|
public function setDeletedAs(mixed $deletedAs): void |
584
|
|
|
{ |
585
|
|
|
$this->deletedAs = $deletedAs; |
586
|
|
|
} |
587
|
|
|
|
588
|
|
|
/** |
589
|
|
|
* Returns the value of field deletedBy |
590
|
|
|
* Column: deleted_by |
591
|
|
|
* Attributes: Numeric | Unsigned |
592
|
|
|
* @return mixed |
593
|
|
|
*/ |
594
|
|
|
public function getDeletedBy(): mixed |
595
|
|
|
{ |
596
|
|
|
return $this->deletedBy; |
597
|
|
|
} |
598
|
|
|
|
599
|
|
|
/** |
600
|
|
|
* Sets the value of field deletedBy |
601
|
|
|
* Column: deleted_by |
602
|
|
|
* Attributes: Numeric | Unsigned |
603
|
|
|
* @param mixed $deletedBy |
604
|
|
|
* @return void |
605
|
|
|
*/ |
606
|
|
|
public function setDeletedBy(mixed $deletedBy): void |
607
|
|
|
{ |
608
|
|
|
$this->deletedBy = $deletedBy; |
609
|
|
|
} |
610
|
|
|
|
611
|
|
|
/** |
612
|
|
|
* Returns the value of field restoredAt |
613
|
|
|
* Column: restored_at |
614
|
|
|
* Attributes: Type(4) |
615
|
|
|
* @return mixed |
616
|
|
|
*/ |
617
|
|
|
public function getRestoredAt(): mixed |
618
|
|
|
{ |
619
|
|
|
return $this->restoredAt; |
620
|
|
|
} |
621
|
|
|
|
622
|
|
|
/** |
623
|
|
|
* Sets the value of field restoredAt |
624
|
|
|
* Column: restored_at |
625
|
|
|
* Attributes: Type(4) |
626
|
|
|
* @param mixed $restoredAt |
627
|
|
|
* @return void |
628
|
|
|
*/ |
629
|
|
|
public function setRestoredAt(mixed $restoredAt): void |
630
|
|
|
{ |
631
|
|
|
$this->restoredAt = $restoredAt; |
632
|
|
|
} |
633
|
|
|
|
634
|
|
|
/** |
635
|
|
|
* Returns the value of field restoredBy |
636
|
|
|
* Column: restored_by |
637
|
|
|
* Attributes: Numeric | Unsigned |
638
|
|
|
* @return mixed |
639
|
|
|
*/ |
640
|
|
|
public function getRestoredBy(): mixed |
641
|
|
|
{ |
642
|
|
|
return $this->restoredBy; |
643
|
|
|
} |
644
|
|
|
|
645
|
|
|
/** |
646
|
|
|
* Sets the value of field restoredBy |
647
|
|
|
* Column: restored_by |
648
|
|
|
* Attributes: Numeric | Unsigned |
649
|
|
|
* @param mixed $restoredBy |
650
|
|
|
* @return void |
651
|
|
|
*/ |
652
|
|
|
public function setRestoredBy(mixed $restoredBy): void |
653
|
|
|
{ |
654
|
|
|
$this->restoredBy = $restoredBy; |
655
|
|
|
} |
656
|
|
|
|
657
|
|
|
/** |
658
|
|
|
* Returns the value of field restoredAs |
659
|
|
|
* Column: restored_as |
660
|
|
|
* Attributes: Numeric | Unsigned |
661
|
|
|
* @return mixed |
662
|
|
|
*/ |
663
|
|
|
public function getRestoredAs(): mixed |
664
|
|
|
{ |
665
|
|
|
return $this->restoredAs; |
666
|
|
|
} |
667
|
|
|
|
668
|
|
|
/** |
669
|
|
|
* Sets the value of field restoredAs |
670
|
|
|
* Column: restored_as |
671
|
|
|
* Attributes: Numeric | Unsigned |
672
|
|
|
* @param mixed $restoredAs |
673
|
|
|
* @return void |
674
|
|
|
*/ |
675
|
|
|
public function setRestoredAs(mixed $restoredAs): void |
676
|
|
|
{ |
677
|
|
|
$this->restoredAs = $restoredAs; |
678
|
|
|
} |
679
|
|
|
|
680
|
|
|
/** |
681
|
|
|
* Adds the default relationships to the model. |
682
|
|
|
* @return void |
683
|
|
|
*/ |
684
|
|
|
public function addDefaultRelationships(): void |
685
|
|
|
{ |
686
|
|
|
$this->hasMany('id', Flag::class, 'pageId', ['alias' => 'FlagList']); |
687
|
|
|
|
688
|
|
|
$this->hasManyToMany( |
689
|
|
|
'id', |
690
|
|
|
Flag::class, |
691
|
|
|
'pageId', |
692
|
|
|
'siteId', |
693
|
|
|
Site::class, |
694
|
|
|
'id', |
695
|
|
|
['alias' => 'FlagSiteList'] |
696
|
|
|
); |
697
|
|
|
|
698
|
|
|
$this->hasManyToMany( |
699
|
|
|
'id', |
700
|
|
|
Flag::class, |
701
|
|
|
'pageId', |
702
|
|
|
'langId', |
703
|
|
|
Lang::class, |
704
|
|
|
'id', |
705
|
|
|
['alias' => 'FlagLangList'] |
706
|
|
|
); |
707
|
|
|
|
708
|
|
|
$this->hasMany('id', Meta::class, 'pageId', ['alias' => 'MetaList']); |
709
|
|
|
|
710
|
|
|
$this->hasManyToMany( |
711
|
|
|
'id', |
712
|
|
|
Meta::class, |
713
|
|
|
'pageId', |
714
|
|
|
'langId', |
715
|
|
|
Lang::class, |
716
|
|
|
'id', |
717
|
|
|
['alias' => 'MetaLangList'] |
718
|
|
|
); |
719
|
|
|
|
720
|
|
|
$this->hasManyToMany( |
721
|
|
|
'id', |
722
|
|
|
Meta::class, |
723
|
|
|
'pageId', |
724
|
|
|
'siteId', |
725
|
|
|
Site::class, |
726
|
|
|
'id', |
727
|
|
|
['alias' => 'MetaSiteList'] |
728
|
|
|
); |
729
|
|
|
|
730
|
|
|
$this->hasManyToMany( |
731
|
|
|
'id', |
732
|
|
|
Meta::class, |
733
|
|
|
'pageId', |
734
|
|
|
'postId', |
735
|
|
|
Post::class, |
736
|
|
|
'id', |
737
|
|
|
['alias' => 'MetaPostList'] |
738
|
|
|
); |
739
|
|
|
|
740
|
|
|
$this->hasManyToMany( |
741
|
|
|
'id', |
742
|
|
|
Meta::class, |
743
|
|
|
'pageId', |
744
|
|
|
'categoryId', |
745
|
|
|
Category::class, |
746
|
|
|
'id', |
747
|
|
|
['alias' => 'MetaCategoryList'] |
748
|
|
|
); |
749
|
|
|
|
750
|
|
|
$this->hasMany('id', Post::class, 'pageId', ['alias' => 'PostList']); |
751
|
|
|
|
752
|
|
|
$this->hasManyToMany( |
753
|
|
|
'id', |
754
|
|
|
Post::class, |
755
|
|
|
'pageId', |
756
|
|
|
'langId', |
757
|
|
|
Lang::class, |
758
|
|
|
'id', |
759
|
|
|
['alias' => 'PostLangList'] |
760
|
|
|
); |
761
|
|
|
|
762
|
|
|
$this->hasManyToMany( |
763
|
|
|
'id', |
764
|
|
|
Post::class, |
765
|
|
|
'pageId', |
766
|
|
|
'siteId', |
767
|
|
|
Site::class, |
768
|
|
|
'id', |
769
|
|
|
['alias' => 'PostSiteList'] |
770
|
|
|
); |
771
|
|
|
|
772
|
|
|
$this->hasMany('id', Translate::class, 'pageId', ['alias' => 'TranslateList']); |
773
|
|
|
|
774
|
|
|
$this->hasManyToMany( |
775
|
|
|
'id', |
776
|
|
|
Translate::class, |
777
|
|
|
'pageId', |
778
|
|
|
'langId', |
779
|
|
|
Lang::class, |
780
|
|
|
'id', |
781
|
|
|
['alias' => 'TranslateLangList'] |
782
|
|
|
); |
783
|
|
|
|
784
|
|
|
$this->hasManyToMany( |
785
|
|
|
'id', |
786
|
|
|
Translate::class, |
787
|
|
|
'pageId', |
788
|
|
|
'siteId', |
789
|
|
|
Site::class, |
790
|
|
|
'id', |
791
|
|
|
['alias' => 'TranslateSiteList'] |
792
|
|
|
); |
793
|
|
|
|
794
|
|
|
$this->hasManyToMany( |
795
|
|
|
'id', |
796
|
|
|
Translate::class, |
797
|
|
|
'pageId', |
798
|
|
|
'postId', |
799
|
|
|
Post::class, |
800
|
|
|
'id', |
801
|
|
|
['alias' => 'TranslatePostList'] |
802
|
|
|
); |
803
|
|
|
|
804
|
|
|
$this->hasManyToMany( |
805
|
|
|
'id', |
806
|
|
|
Translate::class, |
807
|
|
|
'pageId', |
808
|
|
|
'categoryId', |
809
|
|
|
Category::class, |
810
|
|
|
'id', |
811
|
|
|
['alias' => 'TranslateCategoryList'] |
812
|
|
|
); |
813
|
|
|
|
814
|
|
|
$this->belongsTo('langId', Lang::class, 'id', ['alias' => 'LangEntity']); |
815
|
|
|
|
816
|
|
|
$this->belongsTo('siteId', Site::class, 'id', ['alias' => 'SiteEntity']); |
817
|
|
|
|
818
|
|
|
$this->belongsTo('createdBy', User::class, 'id', ['alias' => 'CreatedByEntity']); |
819
|
|
|
|
820
|
|
|
$this->belongsTo('createdAs', User::class, 'id', ['alias' => 'CreatedAsEntity']); |
821
|
|
|
|
822
|
|
|
$this->belongsTo('updatedBy', User::class, 'id', ['alias' => 'UpdatedByEntity']); |
823
|
|
|
|
824
|
|
|
$this->belongsTo('updatedAs', User::class, 'id', ['alias' => 'UpdatedAsEntity']); |
825
|
|
|
|
826
|
|
|
$this->belongsTo('deletedAs', User::class, 'id', ['alias' => 'DeletedAsEntity']); |
827
|
|
|
|
828
|
|
|
$this->belongsTo('deletedBy', User::class, 'id', ['alias' => 'DeletedByEntity']); |
829
|
|
|
|
830
|
|
|
$this->belongsTo('restoredBy', User::class, 'id', ['alias' => 'RestoredByEntity']); |
831
|
|
|
|
832
|
|
|
$this->belongsTo('restoredAs', User::class, 'id', ['alias' => 'RestoredAsEntity']); |
833
|
|
|
} |
834
|
|
|
|
835
|
|
|
/** |
836
|
|
|
* Adds the default validations to the model. |
837
|
|
|
* @param Validation|null $validator |
838
|
|
|
* @return Validation |
839
|
|
|
*/ |
840
|
|
|
public function addDefaultValidations(?Validation $validator = null): Validation |
841
|
|
|
{ |
842
|
|
|
$validator ??= new Validation(); |
843
|
|
|
|
844
|
|
|
$this->addUnsignedIntValidation($validator, 'id', true); |
845
|
|
|
$this->addUnsignedIntValidation($validator, 'langId', true); |
846
|
|
|
$this->addUnsignedIntValidation($validator, 'siteId', false); |
847
|
|
|
$this->addStringLengthValidation($validator, 'name', 0, 255, false); |
848
|
|
|
$this->addStringLengthValidation($validator, 'description', 0, 255, true); |
849
|
|
|
$this->addUnsignedIntValidation($validator, 'deleted', false); |
850
|
|
|
$this->addDateTimeValidation($validator, 'createdAt', false); |
851
|
|
|
$this->addUnsignedIntValidation($validator, 'createdBy', true); |
852
|
|
|
$this->addUnsignedIntValidation($validator, 'createdAs', true); |
853
|
|
|
$this->addDateTimeValidation($validator, 'updatedAt', true); |
854
|
|
|
$this->addUnsignedIntValidation($validator, 'updatedBy', true); |
855
|
|
|
$this->addUnsignedIntValidation($validator, 'updatedAs', true); |
856
|
|
|
$this->addDateTimeValidation($validator, 'deletedAt', true); |
857
|
|
|
$this->addUnsignedIntValidation($validator, 'deletedAs', true); |
858
|
|
|
$this->addUnsignedIntValidation($validator, 'deletedBy', true); |
859
|
|
|
$this->addDateTimeValidation($validator, 'restoredAt', true); |
860
|
|
|
$this->addUnsignedIntValidation($validator, 'restoredBy', true); |
861
|
|
|
$this->addUnsignedIntValidation($validator, 'restoredAs', true); |
862
|
|
|
|
863
|
|
|
return $validator; |
864
|
|
|
} |
865
|
|
|
|
866
|
|
|
|
867
|
|
|
/** |
868
|
|
|
* Returns an array that maps the column names of the database |
869
|
|
|
* table to the corresponding property names of the model. |
870
|
|
|
* |
871
|
|
|
* @returns array The array mapping the column names to the property names |
872
|
|
|
*/ |
873
|
|
|
public function columnMap(): array |
874
|
|
|
{ |
875
|
|
|
return [ |
876
|
|
|
'id' => 'id', |
877
|
|
|
'lang_id' => 'langId', |
878
|
|
|
'site_id' => 'siteId', |
879
|
|
|
'name' => 'name', |
880
|
|
|
'description' => 'description', |
881
|
|
|
'deleted' => 'deleted', |
882
|
|
|
'created_at' => 'createdAt', |
883
|
|
|
'created_by' => 'createdBy', |
884
|
|
|
'created_as' => 'createdAs', |
885
|
|
|
'updated_at' => 'updatedAt', |
886
|
|
|
'updated_by' => 'updatedBy', |
887
|
|
|
'updated_as' => 'updatedAs', |
888
|
|
|
'deleted_at' => 'deletedAt', |
889
|
|
|
'deleted_as' => 'deletedAs', |
890
|
|
|
'deleted_by' => 'deletedBy', |
891
|
|
|
'restored_at' => 'restoredAt', |
892
|
|
|
'restored_by' => 'restoredBy', |
893
|
|
|
'restored_as' => 'restoredAs', |
894
|
|
|
]; |
895
|
|
|
} |
896
|
|
|
} |
897
|
|
|
|