| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | abstract class Assignment extends \roaresearch\yii2\rmdb\migrations\CreatePivot |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string suffix attached at the end of the process table. |
||
| 12 | */ |
||
| 13 | public $assignmentSuffix = '_assignment'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @return string name of the table to which the assignment will be attached. |
||
| 17 | */ |
||
| 18 | abstract public function getProcessTableName(): string; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @inhertidoc |
||
| 22 | */ |
||
| 23 | public function getTableName(): string |
||
| 24 | { |
||
| 25 | return $this->getProcessTableName() . $this->assignmentSuffix; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @inhertidoc |
||
| 30 | */ |
||
| 31 | public function columns(): array |
||
| 36 | ]; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @inhertidoc |
||
| 41 | */ |
||
| 42 | public function foreignKeys(): array |
||
| 46 | ]; |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @inhertidoc |
||
| 51 | */ |
||
| 52 | public function compositePrimaryKeys(): array |
||
| 57 |