-
Notifications
You must be signed in to change notification settings - Fork 243
Expand file tree
/
Copy pathCaseParticipated.php
More file actions
64 lines (55 loc) · 1.51 KB
/
CaseParticipated.php
File metadata and controls
64 lines (55 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
namespace ProcessMaker\Models;
use Database\Factories\CaseParticipatedFactory;
use Illuminate\Database\Eloquent\Casts\AsCollection;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use ProcessMaker\Models\ProcessMakerModel;
use ProcessMaker\Traits\HandlesValueAliasStatus;
class CaseParticipated extends ProcessMakerModel
{
use HasFactory;
use HandlesValueAliasStatus;
protected $table = 'cases_participated';
protected $fillable = [
'user_id',
'case_number',
'case_title',
'case_title_formatted',
'case_status',
'processes',
'requests',
'request_tokens',
'tasks',
'participants',
'initiated_at',
'completed_at',
'keywords',
'last_stage_id',
'last_stage_name',
'progress',
];
protected $casts = [
'processes' => AsCollection::class,
'requests' => AsCollection::class,
'request_tokens' => AsCollection::class,
'tasks' => AsCollection::class,
'participants' => AsCollection::class,
'completed_at' => 'datetime:c',
'initiated_at' => 'datetime:c',
];
protected $attributes = [
'keywords' => '',
];
protected static function newFactory(): Factory
{
return CaseParticipatedFactory::new();
}
/**
* Get the user that owns the case.
*/
public function user()
{
return $this->belongsTo(User::class);
}
}