forked from ProcessMaker/processmaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCaseStarted.php
More file actions
57 lines (49 loc) · 1.36 KB
/
CaseStarted.php
File metadata and controls
57 lines (49 loc) · 1.36 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
<?php
namespace ProcessMaker\Models;
use Database\Factories\CaseStartedFactory;
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 CaseStarted extends ProcessMakerModel
{
use HasFactory;
use HandlesValueAliasStatus;
protected $table = 'cases_started';
protected $fillable = [
'case_number',
'user_id',
'case_title',
'case_title_formatted',
'case_status',
'processes',
'requests',
'request_tokens',
'tasks',
'participants',
'initiated_at',
'completed_at',
'keywords',
];
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 static function newFactory(): Factory
{
return CaseStartedFactory::new();
}
/**
* Get the user that owns the case.
*/
public function user()
{
return $this->belongsTo(User::class);
}
}