|
1
|
|
|
<?php |
|
2
|
|
|
namespace Jawaraegov\Workflows\database\seeds; |
|
3
|
|
|
use Illuminate\Database\Seeder; |
|
4
|
|
|
|
|
5
|
|
|
class WorkflowTransitionsSeeder extends Seeder { |
|
6
|
|
|
|
|
7
|
|
|
public function run() |
|
8
|
|
|
{ |
|
9
|
|
|
//DB::table('workflow_transitions')->delete(); |
|
10
|
|
|
$data1 = array( |
|
11
|
|
|
'name' => 'propose-to-propose', |
|
12
|
|
|
'label' => 'Propose To Propose', |
|
13
|
|
|
'from' => 'propose', |
|
14
|
|
|
'to' => 'propose', |
|
15
|
|
|
'message' => 'propose To Propose', |
|
16
|
|
|
'status' => '1' |
|
17
|
|
|
); |
|
18
|
|
|
\DB::table('workflow_transitions')->insert($data1); |
|
19
|
|
|
$data2 = array( |
|
20
|
|
|
'name' => 'propose-to-request', |
|
21
|
|
|
'label' => 'Propose To Request', |
|
22
|
|
|
'from' => 'propose', |
|
23
|
|
|
'to' => 'request', |
|
24
|
|
|
'message' => 'propose To Request', |
|
25
|
|
|
'status' => '1' |
|
26
|
|
|
); |
|
27
|
|
|
\DB::table('workflow_transitions')->insert($data2); |
|
28
|
|
|
$data3 = array( |
|
29
|
|
|
'name' => 'request-to-approved', |
|
30
|
|
|
'label' => 'Request To Approved', |
|
31
|
|
|
'from' => 'request', |
|
32
|
|
|
'to' => 'approved', |
|
33
|
|
|
'message' => 'Request To Approved', |
|
34
|
|
|
'status' => '1' |
|
35
|
|
|
); |
|
36
|
|
|
\DB::table('workflow_transitions')->insert($data3); |
|
37
|
|
|
$data4 = array( |
|
38
|
|
|
'name' => 'request-to-rejected', |
|
39
|
|
|
'label' => 'Request To Rejected', |
|
40
|
|
|
'from' => 'request', |
|
41
|
|
|
'to' => 'rejected', |
|
42
|
|
|
'message' => 'Request To Rejected', |
|
43
|
|
|
'status' => '1' |
|
44
|
|
|
); |
|
45
|
|
|
\DB::table('workflow_transitions')->insert($data4); |
|
46
|
|
|
$data5 = array( |
|
47
|
|
|
'name' => 'approved-to-rejected', |
|
48
|
|
|
'label' => 'Approved To Rejected', |
|
49
|
|
|
'from' => 'approved', |
|
50
|
|
|
'to' => 'rejected', |
|
51
|
|
|
'message' => 'Approved To Rejected', |
|
52
|
|
|
'status' => '1' |
|
53
|
|
|
); |
|
54
|
|
|
\DB::table('workflow_transitions')->insert($data5); |
|
55
|
|
|
$data6 = array( |
|
56
|
|
|
'name' => 'rejected-to-approved', |
|
57
|
|
|
'label' => 'Rejected To Approved', |
|
58
|
|
|
'from' => 'rejected', |
|
59
|
|
|
'to' => 'approved', |
|
60
|
|
|
'message' => 'Rejected To Approved', |
|
61
|
|
|
'status' => '1' |
|
62
|
|
|
); |
|
63
|
|
|
\DB::table('workflow_transitions')->insert($data6); |
|
64
|
|
|
$data7 = array( |
|
65
|
|
|
'name' => 'request-to-needs-completed-document', |
|
66
|
|
|
'label' => 'Request To Needs Completed Document', |
|
67
|
|
|
'from' => 'request', |
|
68
|
|
|
'to' => 'needs-completed-document', |
|
69
|
|
|
'message' => 'Request To Needs Completed Document', |
|
70
|
|
|
'status' => '0' |
|
71
|
|
|
); |
|
72
|
|
|
\DB::table('workflow_transitions')->insert($data7); |
|
73
|
|
|
$data8 = array( |
|
74
|
|
|
'name' => 'needs-completed-document-to-document-submitted', |
|
75
|
|
|
'label' => 'Needs Completed Document To Document Submitted', |
|
76
|
|
|
'from' => 'needs-completed-document', |
|
77
|
|
|
'to' => 'document-submitted', |
|
78
|
|
|
'message' => 'Needs Completed Document To Document Submitted', |
|
79
|
|
|
'status' => '0' |
|
80
|
|
|
); |
|
81
|
|
|
\DB::table('workflow_transitions')->insert($data8); |
|
82
|
|
|
$data9 = array( |
|
83
|
|
|
'name' => 'document-submitted-to-approved', |
|
84
|
|
|
'label' => 'Document Submitted To Approved', |
|
85
|
|
|
'from' => 'document-submitted', |
|
86
|
|
|
'to' => 'approved', |
|
87
|
|
|
'message' => 'Document Submitted To Approved', |
|
88
|
|
|
'status' => '0' |
|
89
|
|
|
); |
|
90
|
|
|
\DB::table('workflow_transitions')->insert($data9); |
|
91
|
|
|
$data = array( |
|
92
|
|
|
'name' => 'document-submitted-to-rejected', |
|
93
|
|
|
'label' => 'Document Submitted To Rejected', |
|
94
|
|
|
'from' => 'document-submitted', |
|
95
|
|
|
'to' => 'rejected', |
|
96
|
|
|
'message' => 'Document Submitted To Rejected', |
|
97
|
|
|
'status' => '0' |
|
98
|
|
|
); |
|
99
|
|
|
\DB::table('workflow_transitions')->insert($data); |
|
100
|
|
|
} |
|
101
|
|
|
} |
|
102
|
|
|
|