Test Failed
Push — master ( 58b557...c015ac )
by Alexey
04:03
created

Log   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A relations() 0 8 1
1
<?php
2
3
/**
4
 * Exchange Log
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 Exchange1c\Exchange;
13
14
class Log extends \Model {
15
16
    public static $logging = false;
17
    public static $cols = [
18
        'type' => ['type' => 'text'],
19
        'info' => ['type' => 'text'],
20
        'query' => ['type' => 'text'],
21
        'status' => ['type' => 'text'],
22
        'exchange_id' => ['type' => 'select', 'source' => 'relation', 'realtion' => 'exchange'],
23
        'date_create' => ['type' => 'dateTime'],
24
        'date_end' => ['type' => 'dateTime', 'null' => true, 'emptyValue' => null],
25
    ];
26
    public static $dataManagers = [
27
        'manager' => [
28
            'cols' => [
29
                'type', 'info', 'query', 'status', 'date_create', 'date_end'
30
            ],
31
        ]
32
    ];
33
    public static $forms = [
34
        'manager' => [
35
            'map' => [
36
                ['type', 'info', 'status'],
37
                ['query']
38
            ]
39
        ]
40
    ];
41
42
    public static function relations() {
43
        return [
44
            'exchange' => [
45
                'col' => 'exchange_id',
46
                'model' => 'Exchange1c\Exchange'
47
            ]
48
        ];
49
    }
50
51
}