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

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