Total Complexity | 5 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | class m170101_000003_workflow_transition extends CreateEntity |
||
6 | { |
||
7 | /** |
||
8 | * @inhertidoc |
||
9 | */ |
||
10 | public function getTableName(): string |
||
11 | { |
||
12 | return 'workflow_transition'; |
||
13 | } |
||
14 | |||
15 | /** |
||
16 | * @inhertidoc |
||
17 | */ |
||
18 | public function columns(): array |
||
19 | { |
||
20 | return [ |
||
21 | 'source_stage_id' => $this->normalKey(), |
||
22 | 'target_stage_id' => $this->normalKey(), |
||
23 | 'name' => $this->string(64)->notNull(), |
||
24 | ]; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @inhertidoc |
||
29 | */ |
||
30 | public function foreignKeys(): array |
||
31 | { |
||
32 | return [ |
||
33 | 'source_stage_id' => 'workflow_stage', |
||
34 | 'target_stage_id' => 'workflow_stage', |
||
35 | ]; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @inhertidoc |
||
40 | */ |
||
41 | public function compositePrimaryKeys(): array |
||
42 | { |
||
43 | return ['source_stage_id', 'target_stage_id']; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @inhertidoc |
||
48 | */ |
||
49 | public function compositeUniqueKeys(): array |
||
52 | } |
||
53 | } |
||
54 |