Completed
Push — master ( 15aae6...22f267 )
by Klochok
14:21
created

MonitoringSettings::getNicMediaDefault()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace hipanel\modules\server\models;
4
5
class MonitoringSettings extends \hipanel\base\Model
6
{
7
    const SCENARIO_DEFAULT = 'dumb';
8
9
    public static function tableName()
10
    {
11
        return 'server';
12
    }
13
14
    public function rules()
15
    {
16
        return [
17
            [['id', 'nic_media', 'channel_load'], 'integer'],
18
            [['watch_trafdown', 'vcdn_only'], 'boolean'],
19
            [['server', 'emails', 'minutes', 'comment'], 'string'],
20
        ];
21
    }
22
23
    public static function primaryKey()
24
    {
25
        return ['id'];
26
    }
27
28
    public function scenarioActions()
29
    {
30
        return [
31
            'default' => 'set-monitoring-settings'
32
        ];
33
    }
34
}
35