Test Failed
Push — master ( e7eea4...33f872 )
by Julien
09:37 queued 04:42
created

AbstractBackup::getRestoredBy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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
/**
44
 * AbstractBackup
45
 * 
46
 * @package Zemit\Models\Abstracts
47
 * @autogenerated by Phalcon Developer Tools
48
 * @date 2024-02-29, 01:55:19
49
 */
50
abstract class AbstractBackup extends \Zemit\Models\AbstractModel
51
{
52
53
    /**
54
     *
55
     * @var integer
56
     */
57
    protected $id;
58
59
    /**
60
     *
61
     * @var integer
62
     */
63
    protected $uuid;
64
65
    /**
66
     *
67
     * @var string
68
     */
69
    protected $name;
70
71
    /**
72
     *
73
     * @var integer
74
     */
75
    protected $deleted;
76
77
    /**
78
     *
79
     * @var string
80
     */
81
    protected $createdAt;
82
83
    /**
84
     *
85
     * @var integer
86
     */
87
    protected $createdBy;
88
89
    /**
90
     *
91
     * @var integer
92
     */
93
    protected $createdAs;
94
95
    /**
96
     *
97
     * @var string
98
     */
99
    protected $updatedAt;
100
101
    /**
102
     *
103
     * @var integer
104
     */
105
    protected $updatedBy;
106
107
    /**
108
     *
109
     * @var integer
110
     */
111
    protected $updatedAs;
112
113
    /**
114
     *
115
     * @var string
116
     */
117
    protected $deletedAt;
118
119
    /**
120
     *
121
     * @var integer
122
     */
123
    protected $deletedAs;
124
125
    /**
126
     *
127
     * @var integer
128
     */
129
    protected $deletedBy;
130
131
    /**
132
     *
133
     * @var string
134
     */
135
    protected $restoredAt;
136
137
    /**
138
     *
139
     * @var integer
140
     */
141
    protected $restoredBy;
142
143
    /**
144
     * Method to set the value of field id
145
     *
146
     * @param integer $id
147
     * @return $this
148
     */
149
    public function setId($id)
150
    {
151
        $this->id = $id;
152
153
        return $this;
154
    }
155
156
    /**
157
     * Method to set the value of field uuid
158
     *
159
     * @param integer $uuid
160
     * @return $this
161
     */
162
    public function setUuid($uuid)
163
    {
164
        $this->uuid = $uuid;
165
166
        return $this;
167
    }
168
169
    /**
170
     * Method to set the value of field name
171
     *
172
     * @param string $name
173
     * @return $this
174
     */
175
    public function setName($name)
176
    {
177
        $this->name = $name;
178
179
        return $this;
180
    }
181
182
    /**
183
     * Method to set the value of field deleted
184
     *
185
     * @param integer $deleted
186
     * @return $this
187
     */
188
    public function setDeleted($deleted)
189
    {
190
        $this->deleted = $deleted;
191
192
        return $this;
193
    }
194
195
    /**
196
     * Method to set the value of field created_at
197
     *
198
     * @param string $createdAt
199
     * @return $this
200
     */
201
    public function setCreatedAt($createdAt)
202
    {
203
        $this->createdAt = $createdAt;
204
205
        return $this;
206
    }
207
208
    /**
209
     * Method to set the value of field created_by
210
     *
211
     * @param integer $createdBy
212
     * @return $this
213
     */
214
    public function setCreatedBy($createdBy)
215
    {
216
        $this->createdBy = $createdBy;
217
218
        return $this;
219
    }
220
221
    /**
222
     * Method to set the value of field created_as
223
     *
224
     * @param integer $createdAs
225
     * @return $this
226
     */
227
    public function setCreatedAs($createdAs)
228
    {
229
        $this->createdAs = $createdAs;
230
231
        return $this;
232
    }
233
234
    /**
235
     * Method to set the value of field updated_at
236
     *
237
     * @param string $updatedAt
238
     * @return $this
239
     */
240
    public function setUpdatedAt($updatedAt)
241
    {
242
        $this->updatedAt = $updatedAt;
243
244
        return $this;
245
    }
246
247
    /**
248
     * Method to set the value of field updated_by
249
     *
250
     * @param integer $updatedBy
251
     * @return $this
252
     */
253
    public function setUpdatedBy($updatedBy)
254
    {
255
        $this->updatedBy = $updatedBy;
256
257
        return $this;
258
    }
259
260
    /**
261
     * Method to set the value of field updated_as
262
     *
263
     * @param integer $updatedAs
264
     * @return $this
265
     */
266
    public function setUpdatedAs($updatedAs)
267
    {
268
        $this->updatedAs = $updatedAs;
269
270
        return $this;
271
    }
272
273
    /**
274
     * Method to set the value of field deleted_at
275
     *
276
     * @param string $deletedAt
277
     * @return $this
278
     */
279
    public function setDeletedAt($deletedAt)
280
    {
281
        $this->deletedAt = $deletedAt;
282
283
        return $this;
284
    }
285
286
    /**
287
     * Method to set the value of field deleted_as
288
     *
289
     * @param integer $deletedAs
290
     * @return $this
291
     */
292
    public function setDeletedAs($deletedAs)
293
    {
294
        $this->deletedAs = $deletedAs;
295
296
        return $this;
297
    }
298
299
    /**
300
     * Method to set the value of field deleted_by
301
     *
302
     * @param integer $deletedBy
303
     * @return $this
304
     */
305
    public function setDeletedBy($deletedBy)
306
    {
307
        $this->deletedBy = $deletedBy;
308
309
        return $this;
310
    }
311
312
    /**
313
     * Method to set the value of field restored_at
314
     *
315
     * @param string $restoredAt
316
     * @return $this
317
     */
318
    public function setRestoredAt($restoredAt)
319
    {
320
        $this->restoredAt = $restoredAt;
321
322
        return $this;
323
    }
324
325
    /**
326
     * Method to set the value of field restored_by
327
     *
328
     * @param integer $restoredBy
329
     * @return $this
330
     */
331
    public function setRestoredBy($restoredBy)
332
    {
333
        $this->restoredBy = $restoredBy;
334
335
        return $this;
336
    }
337
338
    /**
339
     * Returns the value of field id
340
     *
341
     * @return integer
342
     */
343
    public function getId()
344
    {
345
        return $this->id;
346
    }
347
348
    /**
349
     * Returns the value of field uuid
350
     *
351
     * @return integer
352
     */
353
    public function getUuid()
354
    {
355
        return $this->uuid;
356
    }
357
358
    /**
359
     * Returns the value of field name
360
     *
361
     * @return string
362
     */
363
    public function getName()
364
    {
365
        return $this->name;
366
    }
367
368
    /**
369
     * Returns the value of field deleted
370
     *
371
     * @return integer
372
     */
373
    public function getDeleted()
374
    {
375
        return $this->deleted;
376
    }
377
378
    /**
379
     * Returns the value of field createdAt
380
     *
381
     * @return string
382
     */
383
    public function getCreatedAt()
384
    {
385
        return $this->createdAt;
386
    }
387
388
    /**
389
     * Returns the value of field createdBy
390
     *
391
     * @return integer
392
     */
393
    public function getCreatedBy()
394
    {
395
        return $this->createdBy;
396
    }
397
398
    /**
399
     * Returns the value of field createdAs
400
     *
401
     * @return integer
402
     */
403
    public function getCreatedAs()
404
    {
405
        return $this->createdAs;
406
    }
407
408
    /**
409
     * Returns the value of field updatedAt
410
     *
411
     * @return string
412
     */
413
    public function getUpdatedAt()
414
    {
415
        return $this->updatedAt;
416
    }
417
418
    /**
419
     * Returns the value of field updatedBy
420
     *
421
     * @return integer
422
     */
423
    public function getUpdatedBy()
424
    {
425
        return $this->updatedBy;
426
    }
427
428
    /**
429
     * Returns the value of field updatedAs
430
     *
431
     * @return integer
432
     */
433
    public function getUpdatedAs()
434
    {
435
        return $this->updatedAs;
436
    }
437
438
    /**
439
     * Returns the value of field deletedAt
440
     *
441
     * @return string
442
     */
443
    public function getDeletedAt()
444
    {
445
        return $this->deletedAt;
446
    }
447
448
    /**
449
     * Returns the value of field deletedAs
450
     *
451
     * @return integer
452
     */
453
    public function getDeletedAs()
454
    {
455
        return $this->deletedAs;
456
    }
457
458
    /**
459
     * Returns the value of field deletedBy
460
     *
461
     * @return integer
462
     */
463
    public function getDeletedBy()
464
    {
465
        return $this->deletedBy;
466
    }
467
468
    /**
469
     * Returns the value of field restoredAt
470
     *
471
     * @return string
472
     */
473
    public function getRestoredAt()
474
    {
475
        return $this->restoredAt;
476
    }
477
478
    /**
479
     * Returns the value of field restoredBy
480
     *
481
     * @return integer
482
     */
483
    public function getRestoredBy()
484
    {
485
        return $this->restoredBy;
486
    }
487
488
    /**
489
     * Initialize method for model.
490
     */
491
    public function initialize() :void
492
    {
493
        parent::initialize();
494
        // $this->setSchema("zemit_core");
495
        $this->setSource("backup");
496
    }
497
498
    /**
499
     * Allows to query a set of records that match the specified conditions
500
     *
501
     * @param mixed $parameters
502
     * @return AbstractBackup[]|AbstractBackup|\Phalcon\Mvc\Model\ResultSetInterface
503
     */
504
    public static function find($parameters = null): \Phalcon\Mvc\Model\ResultsetInterface
505
    {
506
        return parent::find($parameters);
507
    }
508
509
    /**
510
     * Allows to query the first record that match the specified conditions
511
     *
512
     * @param mixed $parameters
513
     * @return AbstractBackup|\Phalcon\Mvc\Model\ResultInterface|\Phalcon\Mvc\ModelInterface|null
514
     */
515
    public static function findFirst($parameters = null): ?\Phalcon\Mvc\ModelInterface
516
    {
517
        return parent::findFirst($parameters);
518
    }
519
520
    /**
521
     * Independent Column Mapping.
522
     * Keys are the real names in the table and the values their names in the application
523
     *
524
     * @return array
525
     */
526
    public function columnMap()
527
    {
528
        return [
529
            'id' => 'id',
530
            'uuid' => 'uuid',
531
            'name' => 'name',
532
            'deleted' => 'deleted',
533
            'created_at' => 'createdAt',
534
            'created_by' => 'createdBy',
535
            'created_as' => 'createdAs',
536
            'updated_at' => 'updatedAt',
537
            'updated_by' => 'updatedBy',
538
            'updated_as' => 'updatedAs',
539
            'deleted_at' => 'deletedAt',
540
            'deleted_as' => 'deletedAs',
541
            'deleted_by' => 'deletedBy',
542
            'restored_at' => 'restoredAt',
543
            'restored_by' => 'restoredBy'
544
        ];
545
    }
546
547
}
548