1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* This file is part of the Zemit Framework. |
5
|
|
|
* |
6
|
|
|
* (c) Zemit Team <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE.txt |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
* |
11
|
|
|
* -------------------------------------------------------------- |
12
|
|
|
* |
13
|
|
|
* New BSD License |
14
|
|
|
* |
15
|
|
|
* Copyright (c) 2017-present, Zemit CMS Team |
16
|
|
|
* All rights reserved. |
17
|
|
|
* |
18
|
|
|
* Redistribution and use in source and binary forms, with or without |
19
|
|
|
* modification, are permitted provided that the following conditions are met: |
20
|
|
|
* * Redistributions of source code must retain the above copyright |
21
|
|
|
* notice, this list of conditions and the following disclaimer. |
22
|
|
|
* * Redistributions in binary form must reproduce the above copyright |
23
|
|
|
* notice, this list of conditions and the following disclaimer in the |
24
|
|
|
* documentation and/or other materials provided with the distribution. |
25
|
|
|
* * Neither the name of the Zemit nor the |
26
|
|
|
* names of its contributors may be used to endorse or promote products |
27
|
|
|
* derived from this software without specific prior written permission. |
28
|
|
|
* |
29
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
30
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
31
|
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
32
|
|
|
* DISCLAIMED. IN NO EVENT SHALL ZEMIT FRAMEWORK TEAM BE LIABLE FOR ANY |
33
|
|
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
34
|
|
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
35
|
|
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
36
|
|
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
37
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
38
|
|
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
39
|
|
|
*/ |
40
|
|
|
|
41
|
|
|
namespace Zemit\Models\Abstracts; |
42
|
|
|
|
43
|
|
|
use Phalcon\Mvc\ModelInterface; |
44
|
|
|
use Phalcon\Mvc\Model\ResultInterface; |
45
|
|
|
use Phalcon\Mvc\Model\ResultsetInterface; |
46
|
|
|
use Zemit\Models\AbstractModel; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* AbstractFile |
50
|
|
|
* @package Zemit\Models\Base |
51
|
|
|
* @autogenerated by Phalcon Developer Tools |
52
|
|
|
* @date 2023-03-30, 04:45:31 |
53
|
|
|
*/ |
54
|
|
|
abstract class AbstractFile extends AbstractModel |
55
|
|
|
{ |
56
|
|
|
/** |
57
|
|
|
* @var integer |
58
|
|
|
* @Primary |
59
|
|
|
* @Identity |
60
|
|
|
* @Column(column="id", type="integer", nullable=false) |
61
|
|
|
*/ |
62
|
|
|
protected $id; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @var integer |
66
|
|
|
* @Column(column="user_id", type="integer", nullable=true) |
67
|
|
|
*/ |
68
|
|
|
protected $userId; |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @var string |
72
|
|
|
* @Column(column="category", type="string", length='partner','speaker','event','other', nullable=false) |
73
|
|
|
*/ |
74
|
|
|
protected $category; |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @var string |
78
|
|
|
* @Column(column="key", type="string", length=50, nullable=true) |
79
|
|
|
*/ |
80
|
|
|
protected $key; |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @var string |
84
|
|
|
* @Column(column="path", type="string", length=120, nullable=true) |
85
|
|
|
*/ |
86
|
|
|
protected $path; |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @var string |
90
|
|
|
* @Column(column="type", type="string", length=100, nullable=true) |
91
|
|
|
*/ |
92
|
|
|
protected $type; |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @var string |
96
|
|
|
* @Column(column="type_real", type="string", length=100, nullable=true) |
97
|
|
|
*/ |
98
|
|
|
protected $typeReal; |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* @var string |
102
|
|
|
* @Column(column="extension", type="string", length=6, nullable=true) |
103
|
|
|
*/ |
104
|
|
|
protected $extension; |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @var string |
108
|
|
|
* @Column(column="name", type="string", length=100, nullable=true) |
109
|
|
|
*/ |
110
|
|
|
protected $name; |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @var string |
114
|
|
|
* @Column(column="name_temp", type="string", length=120, nullable=true) |
115
|
|
|
*/ |
116
|
|
|
protected $nameTemp; |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @var string |
120
|
|
|
* @Column(column="size", type="string", length=45, nullable=true) |
121
|
|
|
*/ |
122
|
|
|
protected $size; |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @var string |
126
|
|
|
* @Column(column="error", type="string", nullable=true) |
127
|
|
|
*/ |
128
|
|
|
protected $error; |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @var integer |
132
|
|
|
* @Column(column="deleted", type="integer", nullable=false) |
133
|
|
|
*/ |
134
|
|
|
protected $deleted; |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* @var string |
138
|
|
|
* @Column(column="created_at", type="string", nullable=false) |
139
|
|
|
*/ |
140
|
|
|
protected $createdAt; |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @var integer |
144
|
|
|
* @Column(column="created_by", type="integer", nullable=true) |
145
|
|
|
*/ |
146
|
|
|
protected $createdBy; |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* @var integer |
150
|
|
|
* @Column(column="created_as", type="integer", nullable=true) |
151
|
|
|
*/ |
152
|
|
|
protected $createdAs; |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @var string |
156
|
|
|
* @Column(column="updated_at", type="string", nullable=true) |
157
|
|
|
*/ |
158
|
|
|
protected $updatedAt; |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* @var integer |
162
|
|
|
* @Column(column="updated_by", type="integer", nullable=true) |
163
|
|
|
*/ |
164
|
|
|
protected $updatedBy; |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @var integer |
168
|
|
|
* @Column(column="updated_as", type="integer", nullable=true) |
169
|
|
|
*/ |
170
|
|
|
protected $updatedAs; |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* @var string |
174
|
|
|
* @Column(column="deleted_at", type="string", nullable=true) |
175
|
|
|
*/ |
176
|
|
|
protected $deletedAt; |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* @var integer |
180
|
|
|
* @Column(column="deleted_as", type="integer", nullable=true) |
181
|
|
|
*/ |
182
|
|
|
protected $deletedAs; |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* @var integer |
186
|
|
|
* @Column(column="deleted_by", type="integer", nullable=true) |
187
|
|
|
*/ |
188
|
|
|
protected $deletedBy; |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* @var string |
192
|
|
|
* @Column(column="restored_at", type="string", nullable=true) |
193
|
|
|
*/ |
194
|
|
|
protected $restoredAt; |
195
|
|
|
|
196
|
|
|
/** |
197
|
|
|
* @var integer |
198
|
|
|
* @Column(column="restored_by", type="integer", nullable=true) |
199
|
|
|
*/ |
200
|
|
|
protected $restoredBy; |
201
|
|
|
|
202
|
|
|
/** |
203
|
|
|
* @var integer |
204
|
|
|
* @Column(column="restored_as", type="integer", nullable=true) |
205
|
|
|
*/ |
206
|
|
|
protected $restoredAs; |
207
|
|
|
|
208
|
|
|
/** |
209
|
|
|
* Method to set the value of field id |
210
|
|
|
* |
211
|
|
|
* @param integer $id |
212
|
|
|
* @return $this |
213
|
|
|
*/ |
214
|
|
|
public function setId($id) |
215
|
|
|
{ |
216
|
|
|
$this->id = $id; |
217
|
|
|
|
218
|
|
|
return $this; |
219
|
|
|
} |
220
|
|
|
|
221
|
|
|
/** |
222
|
|
|
* Returns the value of field id |
223
|
|
|
* |
224
|
|
|
* @return integer |
225
|
|
|
*/ |
226
|
|
|
public function getId() |
227
|
|
|
{ |
228
|
|
|
return $this->id; |
229
|
|
|
} |
230
|
|
|
|
231
|
|
|
/** |
232
|
|
|
* Method to set the value of field user_id |
233
|
|
|
* |
234
|
|
|
* @param integer $userId |
235
|
|
|
* @return $this |
236
|
|
|
*/ |
237
|
|
|
public function setUserId($userId) |
238
|
|
|
{ |
239
|
|
|
$this->userId = $userId; |
240
|
|
|
|
241
|
|
|
return $this; |
242
|
|
|
} |
243
|
|
|
|
244
|
|
|
/** |
245
|
|
|
* Returns the value of field user_id |
246
|
|
|
* |
247
|
|
|
* @return integer |
248
|
|
|
*/ |
249
|
|
|
public function getUserId() |
250
|
|
|
{ |
251
|
|
|
return $this->userId; |
252
|
|
|
} |
253
|
|
|
|
254
|
|
|
/** |
255
|
|
|
* Method to set the value of field category |
256
|
|
|
* |
257
|
|
|
* @param string $category |
258
|
|
|
* @return $this |
259
|
|
|
*/ |
260
|
|
|
public function setCategory($category) |
261
|
|
|
{ |
262
|
|
|
$this->category = $category; |
263
|
|
|
|
264
|
|
|
return $this; |
265
|
|
|
} |
266
|
|
|
|
267
|
|
|
/** |
268
|
|
|
* Returns the value of field category |
269
|
|
|
* |
270
|
|
|
* @return string |
271
|
|
|
*/ |
272
|
|
|
public function getCategory() |
273
|
|
|
{ |
274
|
|
|
return $this->category; |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
/** |
278
|
|
|
* Method to set the value of field key |
279
|
|
|
* |
280
|
|
|
* @param string $key |
281
|
|
|
* @return $this |
282
|
|
|
*/ |
283
|
|
|
public function setKey($key) |
284
|
|
|
{ |
285
|
|
|
$this->key = $key; |
286
|
|
|
|
287
|
|
|
return $this; |
288
|
|
|
} |
289
|
|
|
|
290
|
|
|
/** |
291
|
|
|
* Returns the value of field key |
292
|
|
|
* |
293
|
|
|
* @return string |
294
|
|
|
*/ |
295
|
|
|
public function getKey() |
296
|
|
|
{ |
297
|
|
|
return $this->key; |
298
|
|
|
} |
299
|
|
|
|
300
|
|
|
/** |
301
|
|
|
* Method to set the value of field path |
302
|
|
|
* |
303
|
|
|
* @param string $path |
304
|
|
|
* @return $this |
305
|
|
|
*/ |
306
|
|
|
public function setPath($path) |
307
|
|
|
{ |
308
|
|
|
$this->path = $path; |
309
|
|
|
|
310
|
|
|
return $this; |
311
|
|
|
} |
312
|
|
|
|
313
|
|
|
/** |
314
|
|
|
* Returns the value of field path |
315
|
|
|
* |
316
|
|
|
* @return string |
317
|
|
|
*/ |
318
|
|
|
public function getPath() |
319
|
|
|
{ |
320
|
|
|
return $this->path; |
321
|
|
|
} |
322
|
|
|
|
323
|
|
|
/** |
324
|
|
|
* Method to set the value of field type |
325
|
|
|
* |
326
|
|
|
* @param string $type |
327
|
|
|
* @return $this |
328
|
|
|
*/ |
329
|
|
|
public function setType($type) |
330
|
|
|
{ |
331
|
|
|
$this->type = $type; |
332
|
|
|
|
333
|
|
|
return $this; |
334
|
|
|
} |
335
|
|
|
|
336
|
|
|
/** |
337
|
|
|
* Returns the value of field type |
338
|
|
|
* |
339
|
|
|
* @return string |
340
|
|
|
*/ |
341
|
|
|
public function getType() |
342
|
|
|
{ |
343
|
|
|
return $this->type; |
344
|
|
|
} |
345
|
|
|
|
346
|
|
|
/** |
347
|
|
|
* Method to set the value of field type_real |
348
|
|
|
* |
349
|
|
|
* @param string $typeReal |
350
|
|
|
* @return $this |
351
|
|
|
*/ |
352
|
|
|
public function setTypeReal($typeReal) |
353
|
|
|
{ |
354
|
|
|
$this->typeReal = $typeReal; |
355
|
|
|
|
356
|
|
|
return $this; |
357
|
|
|
} |
358
|
|
|
|
359
|
|
|
/** |
360
|
|
|
* Returns the value of field type_real |
361
|
|
|
* |
362
|
|
|
* @return string |
363
|
|
|
*/ |
364
|
|
|
public function getTypeReal() |
365
|
|
|
{ |
366
|
|
|
return $this->typeReal; |
367
|
|
|
} |
368
|
|
|
|
369
|
|
|
/** |
370
|
|
|
* Method to set the value of field extension |
371
|
|
|
* |
372
|
|
|
* @param string $extension |
373
|
|
|
* @return $this |
374
|
|
|
*/ |
375
|
|
|
public function setExtension($extension) |
376
|
|
|
{ |
377
|
|
|
$this->extension = $extension; |
378
|
|
|
|
379
|
|
|
return $this; |
380
|
|
|
} |
381
|
|
|
|
382
|
|
|
/** |
383
|
|
|
* Returns the value of field extension |
384
|
|
|
* |
385
|
|
|
* @return string |
386
|
|
|
*/ |
387
|
|
|
public function getExtension() |
388
|
|
|
{ |
389
|
|
|
return $this->extension; |
390
|
|
|
} |
391
|
|
|
|
392
|
|
|
/** |
393
|
|
|
* Method to set the value of field name |
394
|
|
|
* |
395
|
|
|
* @param string $name |
396
|
|
|
* @return $this |
397
|
|
|
*/ |
398
|
|
|
public function setName($name) |
399
|
|
|
{ |
400
|
|
|
$this->name = $name; |
401
|
|
|
|
402
|
|
|
return $this; |
403
|
|
|
} |
404
|
|
|
|
405
|
|
|
/** |
406
|
|
|
* Returns the value of field name |
407
|
|
|
* |
408
|
|
|
* @return string |
409
|
|
|
*/ |
410
|
|
|
public function getName() |
411
|
|
|
{ |
412
|
|
|
return $this->name; |
413
|
|
|
} |
414
|
|
|
|
415
|
|
|
/** |
416
|
|
|
* Method to set the value of field name_temp |
417
|
|
|
* |
418
|
|
|
* @param string $nameTemp |
419
|
|
|
* @return $this |
420
|
|
|
*/ |
421
|
|
|
public function setNameTemp($nameTemp) |
422
|
|
|
{ |
423
|
|
|
$this->nameTemp = $nameTemp; |
424
|
|
|
|
425
|
|
|
return $this; |
426
|
|
|
} |
427
|
|
|
|
428
|
|
|
/** |
429
|
|
|
* Returns the value of field name_temp |
430
|
|
|
* |
431
|
|
|
* @return string |
432
|
|
|
*/ |
433
|
|
|
public function getNameTemp() |
434
|
|
|
{ |
435
|
|
|
return $this->nameTemp; |
436
|
|
|
} |
437
|
|
|
|
438
|
|
|
/** |
439
|
|
|
* Method to set the value of field size |
440
|
|
|
* |
441
|
|
|
* @param string $size |
442
|
|
|
* @return $this |
443
|
|
|
*/ |
444
|
|
|
public function setSize($size) |
445
|
|
|
{ |
446
|
|
|
$this->size = $size; |
447
|
|
|
|
448
|
|
|
return $this; |
449
|
|
|
} |
450
|
|
|
|
451
|
|
|
/** |
452
|
|
|
* Returns the value of field size |
453
|
|
|
* |
454
|
|
|
* @return string |
455
|
|
|
*/ |
456
|
|
|
public function getSize() |
457
|
|
|
{ |
458
|
|
|
return $this->size; |
459
|
|
|
} |
460
|
|
|
|
461
|
|
|
/** |
462
|
|
|
* Method to set the value of field error |
463
|
|
|
* |
464
|
|
|
* @param string $error |
465
|
|
|
* @return $this |
466
|
|
|
*/ |
467
|
|
|
public function setError($error) |
468
|
|
|
{ |
469
|
|
|
$this->error = $error; |
470
|
|
|
|
471
|
|
|
return $this; |
472
|
|
|
} |
473
|
|
|
|
474
|
|
|
/** |
475
|
|
|
* Returns the value of field error |
476
|
|
|
* |
477
|
|
|
* @return string |
478
|
|
|
*/ |
479
|
|
|
public function getError() |
480
|
|
|
{ |
481
|
|
|
return $this->error; |
482
|
|
|
} |
483
|
|
|
|
484
|
|
|
/** |
485
|
|
|
* Method to set the value of field deleted |
486
|
|
|
* |
487
|
|
|
* @param integer $deleted |
488
|
|
|
* @return $this |
489
|
|
|
*/ |
490
|
|
|
public function setDeleted($deleted) |
491
|
|
|
{ |
492
|
|
|
$this->deleted = $deleted; |
493
|
|
|
|
494
|
|
|
return $this; |
495
|
|
|
} |
496
|
|
|
|
497
|
|
|
/** |
498
|
|
|
* Returns the value of field deleted |
499
|
|
|
* |
500
|
|
|
* @return integer |
501
|
|
|
*/ |
502
|
|
|
public function getDeleted() |
503
|
|
|
{ |
504
|
|
|
return $this->deleted; |
505
|
|
|
} |
506
|
|
|
|
507
|
|
|
/** |
508
|
|
|
* Method to set the value of field created_at |
509
|
|
|
* |
510
|
|
|
* @param string $createdAt |
511
|
|
|
* @return $this |
512
|
|
|
*/ |
513
|
|
|
public function setCreatedAt($createdAt) |
514
|
|
|
{ |
515
|
|
|
$this->createdAt = $createdAt; |
516
|
|
|
|
517
|
|
|
return $this; |
518
|
|
|
} |
519
|
|
|
|
520
|
|
|
/** |
521
|
|
|
* Returns the value of field created_at |
522
|
|
|
* |
523
|
|
|
* @return string |
524
|
|
|
*/ |
525
|
|
|
public function getCreatedAt() |
526
|
|
|
{ |
527
|
|
|
return $this->createdAt; |
528
|
|
|
} |
529
|
|
|
|
530
|
|
|
/** |
531
|
|
|
* Method to set the value of field created_by |
532
|
|
|
* |
533
|
|
|
* @param integer $createdBy |
534
|
|
|
* @return $this |
535
|
|
|
*/ |
536
|
|
|
public function setCreatedBy($createdBy) |
537
|
|
|
{ |
538
|
|
|
$this->createdBy = $createdBy; |
539
|
|
|
|
540
|
|
|
return $this; |
541
|
|
|
} |
542
|
|
|
|
543
|
|
|
/** |
544
|
|
|
* Returns the value of field created_by |
545
|
|
|
* |
546
|
|
|
* @return integer |
547
|
|
|
*/ |
548
|
|
|
public function getCreatedBy() |
549
|
|
|
{ |
550
|
|
|
return $this->createdBy; |
551
|
|
|
} |
552
|
|
|
|
553
|
|
|
/** |
554
|
|
|
* Method to set the value of field created_as |
555
|
|
|
* |
556
|
|
|
* @param integer $createdAs |
557
|
|
|
* @return $this |
558
|
|
|
*/ |
559
|
|
|
public function setCreatedAs($createdAs) |
560
|
|
|
{ |
561
|
|
|
$this->createdAs = $createdAs; |
562
|
|
|
|
563
|
|
|
return $this; |
564
|
|
|
} |
565
|
|
|
|
566
|
|
|
/** |
567
|
|
|
* Returns the value of field created_as |
568
|
|
|
* |
569
|
|
|
* @return integer |
570
|
|
|
*/ |
571
|
|
|
public function getCreatedAs() |
572
|
|
|
{ |
573
|
|
|
return $this->createdAs; |
574
|
|
|
} |
575
|
|
|
|
576
|
|
|
/** |
577
|
|
|
* Method to set the value of field updated_at |
578
|
|
|
* |
579
|
|
|
* @param string $updatedAt |
580
|
|
|
* @return $this |
581
|
|
|
*/ |
582
|
|
|
public function setUpdatedAt($updatedAt) |
583
|
|
|
{ |
584
|
|
|
$this->updatedAt = $updatedAt; |
585
|
|
|
|
586
|
|
|
return $this; |
587
|
|
|
} |
588
|
|
|
|
589
|
|
|
/** |
590
|
|
|
* Returns the value of field updated_at |
591
|
|
|
* |
592
|
|
|
* @return string |
593
|
|
|
*/ |
594
|
|
|
public function getUpdatedAt() |
595
|
|
|
{ |
596
|
|
|
return $this->updatedAt; |
597
|
|
|
} |
598
|
|
|
|
599
|
|
|
/** |
600
|
|
|
* Method to set the value of field updated_by |
601
|
|
|
* |
602
|
|
|
* @param integer $updatedBy |
603
|
|
|
* @return $this |
604
|
|
|
*/ |
605
|
|
|
public function setUpdatedBy($updatedBy) |
606
|
|
|
{ |
607
|
|
|
$this->updatedBy = $updatedBy; |
608
|
|
|
|
609
|
|
|
return $this; |
610
|
|
|
} |
611
|
|
|
|
612
|
|
|
/** |
613
|
|
|
* Returns the value of field updated_by |
614
|
|
|
* |
615
|
|
|
* @return integer |
616
|
|
|
*/ |
617
|
|
|
public function getUpdatedBy() |
618
|
|
|
{ |
619
|
|
|
return $this->updatedBy; |
620
|
|
|
} |
621
|
|
|
|
622
|
|
|
/** |
623
|
|
|
* Method to set the value of field updated_as |
624
|
|
|
* |
625
|
|
|
* @param integer $updatedAs |
626
|
|
|
* @return $this |
627
|
|
|
*/ |
628
|
|
|
public function setUpdatedAs($updatedAs) |
629
|
|
|
{ |
630
|
|
|
$this->updatedAs = $updatedAs; |
631
|
|
|
|
632
|
|
|
return $this; |
633
|
|
|
} |
634
|
|
|
|
635
|
|
|
/** |
636
|
|
|
* Returns the value of field updated_as |
637
|
|
|
* |
638
|
|
|
* @return integer |
639
|
|
|
*/ |
640
|
|
|
public function getUpdatedAs() |
641
|
|
|
{ |
642
|
|
|
return $this->updatedAs; |
643
|
|
|
} |
644
|
|
|
|
645
|
|
|
/** |
646
|
|
|
* Method to set the value of field deleted_at |
647
|
|
|
* |
648
|
|
|
* @param string $deletedAt |
649
|
|
|
* @return $this |
650
|
|
|
*/ |
651
|
|
|
public function setDeletedAt($deletedAt) |
652
|
|
|
{ |
653
|
|
|
$this->deletedAt = $deletedAt; |
654
|
|
|
|
655
|
|
|
return $this; |
656
|
|
|
} |
657
|
|
|
|
658
|
|
|
/** |
659
|
|
|
* Returns the value of field deleted_at |
660
|
|
|
* |
661
|
|
|
* @return string |
662
|
|
|
*/ |
663
|
|
|
public function getDeletedAt() |
664
|
|
|
{ |
665
|
|
|
return $this->deletedAt; |
666
|
|
|
} |
667
|
|
|
|
668
|
|
|
/** |
669
|
|
|
* Method to set the value of field deleted_as |
670
|
|
|
* |
671
|
|
|
* @param integer $deletedAs |
672
|
|
|
* @return $this |
673
|
|
|
*/ |
674
|
|
|
public function setDeletedAs($deletedAs) |
675
|
|
|
{ |
676
|
|
|
$this->deletedAs = $deletedAs; |
677
|
|
|
|
678
|
|
|
return $this; |
679
|
|
|
} |
680
|
|
|
|
681
|
|
|
/** |
682
|
|
|
* Returns the value of field deleted_as |
683
|
|
|
* |
684
|
|
|
* @return integer |
685
|
|
|
*/ |
686
|
|
|
public function getDeletedAs() |
687
|
|
|
{ |
688
|
|
|
return $this->deletedAs; |
689
|
|
|
} |
690
|
|
|
|
691
|
|
|
/** |
692
|
|
|
* Method to set the value of field deleted_by |
693
|
|
|
* |
694
|
|
|
* @param integer $deletedBy |
695
|
|
|
* @return $this |
696
|
|
|
*/ |
697
|
|
|
public function setDeletedBy($deletedBy) |
698
|
|
|
{ |
699
|
|
|
$this->deletedBy = $deletedBy; |
700
|
|
|
|
701
|
|
|
return $this; |
702
|
|
|
} |
703
|
|
|
|
704
|
|
|
/** |
705
|
|
|
* Returns the value of field deleted_by |
706
|
|
|
* |
707
|
|
|
* @return integer |
708
|
|
|
*/ |
709
|
|
|
public function getDeletedBy() |
710
|
|
|
{ |
711
|
|
|
return $this->deletedBy; |
712
|
|
|
} |
713
|
|
|
|
714
|
|
|
/** |
715
|
|
|
* Method to set the value of field restored_at |
716
|
|
|
* |
717
|
|
|
* @param string $restoredAt |
718
|
|
|
* @return $this |
719
|
|
|
*/ |
720
|
|
|
public function setRestoredAt($restoredAt) |
721
|
|
|
{ |
722
|
|
|
$this->restoredAt = $restoredAt; |
723
|
|
|
|
724
|
|
|
return $this; |
725
|
|
|
} |
726
|
|
|
|
727
|
|
|
/** |
728
|
|
|
* Returns the value of field restored_at |
729
|
|
|
* |
730
|
|
|
* @return string |
731
|
|
|
*/ |
732
|
|
|
public function getRestoredAt() |
733
|
|
|
{ |
734
|
|
|
return $this->restoredAt; |
735
|
|
|
} |
736
|
|
|
|
737
|
|
|
/** |
738
|
|
|
* Method to set the value of field restored_by |
739
|
|
|
* |
740
|
|
|
* @param integer $restoredBy |
741
|
|
|
* @return $this |
742
|
|
|
*/ |
743
|
|
|
public function setRestoredBy($restoredBy) |
744
|
|
|
{ |
745
|
|
|
$this->restoredBy = $restoredBy; |
746
|
|
|
|
747
|
|
|
return $this; |
748
|
|
|
} |
749
|
|
|
|
750
|
|
|
/** |
751
|
|
|
* Returns the value of field restored_by |
752
|
|
|
* |
753
|
|
|
* @return integer |
754
|
|
|
*/ |
755
|
|
|
public function getRestoredBy() |
756
|
|
|
{ |
757
|
|
|
return $this->restoredBy; |
758
|
|
|
} |
759
|
|
|
|
760
|
|
|
/** |
761
|
|
|
* Method to set the value of field restored_as |
762
|
|
|
* |
763
|
|
|
* @param integer $restoredAs |
764
|
|
|
* @return $this |
765
|
|
|
*/ |
766
|
|
|
public function setRestoredAs($restoredAs) |
767
|
|
|
{ |
768
|
|
|
$this->restoredAs = $restoredAs; |
769
|
|
|
|
770
|
|
|
return $this; |
771
|
|
|
} |
772
|
|
|
|
773
|
|
|
/** |
774
|
|
|
* Returns the value of field restored_as |
775
|
|
|
* |
776
|
|
|
* @return integer |
777
|
|
|
*/ |
778
|
|
|
public function getRestoredAs() |
779
|
|
|
{ |
780
|
|
|
return $this->restoredAs; |
781
|
|
|
} |
782
|
|
|
|
783
|
|
|
/** |
784
|
|
|
* Initialize method for model. |
785
|
|
|
*/ |
786
|
|
|
public function initialize(): void |
787
|
|
|
{ |
788
|
|
|
parent::initialize(); |
789
|
|
|
// $this->setSchema('zemit_core'); |
790
|
|
|
$this->setSource('file'); |
791
|
|
|
} |
792
|
|
|
|
793
|
|
|
/** |
794
|
|
|
* Allows to query a set of records that match the specified conditions |
795
|
|
|
* |
796
|
|
|
* @param mixed $parameters |
797
|
|
|
* @return AbstractFile[]|AbstractFile|ResultsetInterface |
798
|
|
|
*/ |
799
|
|
|
public static function find($parameters = null): ResultsetInterface |
800
|
|
|
{ |
801
|
|
|
return parent::find($parameters); |
802
|
|
|
} |
803
|
|
|
|
804
|
|
|
/** |
805
|
|
|
* Allows to query the first record that match the specified conditions |
806
|
|
|
* |
807
|
|
|
* @param mixed $parameters |
808
|
|
|
* @return AbstractFile|ResultInterface|ModelInterface|null |
809
|
|
|
*/ |
810
|
|
|
public static function findFirst($parameters = null): ?ModelInterface |
811
|
|
|
{ |
812
|
|
|
return parent::findFirst($parameters); |
813
|
|
|
} |
814
|
|
|
|
815
|
|
|
/** |
816
|
|
|
* Independent Column Mapping. |
817
|
|
|
* Keys are the real names in the table and the values their names in the application |
818
|
|
|
* |
819
|
|
|
* @return array |
820
|
|
|
*/ |
821
|
|
|
public function columnMap() |
822
|
|
|
{ |
823
|
|
|
return [ |
824
|
|
|
'id' => 'id', |
825
|
|
|
'user_id' => 'userId', |
826
|
|
|
'category' => 'category', |
827
|
|
|
'key' => 'key', |
828
|
|
|
'path' => 'path', |
829
|
|
|
'type' => 'type', |
830
|
|
|
'type_real' => 'typeReal', |
831
|
|
|
'extension' => 'extension', |
832
|
|
|
'name' => 'name', |
833
|
|
|
'name_temp' => 'nameTemp', |
834
|
|
|
'size' => 'size', |
835
|
|
|
'error' => 'error', |
836
|
|
|
'deleted' => 'deleted', |
837
|
|
|
'created_at' => 'createdAt', |
838
|
|
|
'created_by' => 'createdBy', |
839
|
|
|
'created_as' => 'createdAs', |
840
|
|
|
'updated_at' => 'updatedAt', |
841
|
|
|
'updated_by' => 'updatedBy', |
842
|
|
|
'updated_as' => 'updatedAs', |
843
|
|
|
'deleted_at' => 'deletedAt', |
844
|
|
|
'deleted_as' => 'deletedAs', |
845
|
|
|
'deleted_by' => 'deletedBy', |
846
|
|
|
'restored_at' => 'restoredAt', |
847
|
|
|
'restored_by' => 'restoredBy', |
848
|
|
|
'restored_as' => 'restoredAs', |
849
|
|
|
]; |
850
|
|
|
} |
851
|
|
|
} |
852
|
|
|
|