TarifModel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMasterTarif() 0 4 1
A getItem() 0 4 1
1
<?php
2
3
namespace Bantenprov\PemakaianBahuJalan\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
8
class TarifModel extends Model 
9
{
10
11
    protected $table = 'pbj_tarifs';
12
    public $timestamps = true;
13
14
    use SoftDeletes;
15
16
    protected $dates = ['deleted_at'];
17
    protected $fillable = array('uuid', 'uraian', 'tarif', 'wilayah_kota', 'wilayah_kabupaten', 'satuan', 'master_tarif_id');
18
19
    public function getMasterTarif()
20
    {
21
        return $this->hasOne('MasterTarif', 'master_tarif_id');
22
    }
23
24
    public function getItem()
25
    {
26
        return $this->hasMany('Item', 'id');
27
    }
28
29
}