MonitoringSettings::tableName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
ccs 0
cts 3
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * Server module for HiPanel
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-server
6
 * @package   hipanel-module-server
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\server\models;
12
13
class MonitoringSettings extends \hipanel\base\Model
14
{
15
    const SCENARIO_DEFAULT = 'dumb';
16
17
    public static function tableName()
18
    {
19
        return 'device';
20
    }
21
22
    public function rules()
23
    {
24
        return [
25
            [['id', 'nic_media', 'channel_load'], 'integer'],
26
            [['watch_trafdown', 'vcdn_only'], 'boolean'],
27
            [['server', 'emails', 'minutes', 'comment'], 'string'],
28
        ];
29
    }
30
31
    public static function primaryKey()
32
    {
33
        return ['id'];
34
    }
35
36
    public function scenarioActions()
37
    {
38
        return [
39
            'default' => 'set-monitoring-settings',
40
        ];
41
    }
42
}
43