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