Completed
Push — master ( 22f267...fde715 )
by Klochok
23:32 queued 08:43
created

SoftwareSettings::primaryKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
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 SoftwareSettings extends \hipanel\base\Model
6
{
7
    const SCENARIO_DEFAULT = 'dumb';
8
9
    public static function tableName()
10
    {
11
        return 'server';
12
    }
13
14
    public static function primaryKey()
15
    {
16
        return ['id'];
17
    }
18
19
    public function scenarioActions()
20
    {
21
        return [
22
            'default' => 'set-software-settings'
23
        ];
24
    }
25
26
    public function rules()
27
    {
28
        return [
29
            [['id'], 'integer'],
30
            [['virtual_switch', 'ignore_ip_mon'], 'boolean'],
31
            [['os', 'version', 'ip_mon_comment', 'bw_limit', 'bw_group', 'failure_contacts', 'info'], 'string'],
32
        ];
33
    }
34
}
35