Completed
Push — master ( fde715...d0bc22 )
by Klochok
29:59 queued 15:01
created

HardwareSettings::tableName()   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 HardwareSettings 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
            [['summary', 'order_no', 'brand', 'box', 'cpu', 'ram', 'motherboard', 'hdd', 'hotswap', 'raid', 'units', 'note', 'cage_no', 'rack_no', 'datacenter'], 'string'],
31
        ];
32
    }
33
}
34