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

Request   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 28
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A relations() 0 13 1
1
<?php
2
3
/**
4
 * Merchant request
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 Money\Merchant;
13
14
class Request extends \Model
15
{
16
    public static $cols = [
17
        'post' => ['type' => 'textarea'],
18
        'get' => ['type' => 'textarea'],
19
        'result_callback' => ['type' => 'textarea'],
20
        'system' => ['type' => 'text'],
21
        'status' => ['type' => 'text'],
22
        'pay_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'pay'],
23
        'merchant_id' => ['type' => 'select', 'source' => 'relation', 'relation' => 'merchant'],
24
        'date_create' => ['type' => 'dateTime']
25
    ];
26
27
    public static function relations()
28
    {
29
        return [
30
            'pay' => [
31
                'model' => 'Money\Pay',
32
                'col' => 'pay_id'
33
            ],
34
            'merchant' => [
35
                'model' => 'Money\Merchant',
36
                'col' => 'merchant_id'
37
            ],
38
        ];
39
    }
40
41
}
42