Completed
Push — master ( 0b55a4...076988 )
by Alexey
05:20
created

Value::relations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 9
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 9
loc 9
rs 9.6666
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
/**
4
 * Migration object param value
5
 *
6
 * @author Alexey Krupskiy <[email protected]>
7
 * @link http://inji.ru/
8
 * @copyright 2015 Alexey Krupskiy
9
 * @license https://github.com/injitools/cms-Inji/blob/master/LICENSE
10
 */
11
12
namespace Migrations\Migration\Object\Param;
13
14 View Code Duplication
class Value extends \Model
15
{
16
    public static $cols = [
17
        'origianl' => ['type' => 'textarea'],
18
        'replace' => ['type' => 'textarea'],
19
        'param_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'param'],
20
        'date_create' => ['type' => 'dateTime'],
21
    ];
22
23
    public static function relations()
24
    {
25
        return [
26
            'param' => [
27
                'col' => 'param_id',
28
                'model' => 'Migrations\Migration\Object\Param'
29
            ]
30
        ];
31
    }
32
33
}
34