MasterTarifModel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDaftarRetribusi() 0 4 1
A getUserCreated() 0 4 1
A getUserUpdated() 0 4 1
1
<?php
2
3
namespace Bantenprov\MasterTarif\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
use Kalnoy\Nestedset\NodeTrait;
8
9
class MasterTarifModel extends Model 
10
{
11
    use NodeTrait;
12
13
    protected $table = 'master_tarifs';
14
    public $timestamps = true;
15
16
    use SoftDeletes;
17
18
    protected $dates = ['deleted_at'];
19
20
    protected $fillable = array(
21
        'id',
22
        'uuid',
23
        'nama',
24
        'dasar_hukum',
25
        'status',
26
        'level',
27
        'daftar_retribusi_id',
28
        'daftar_retribusi_uuid',
29
        'user_id',
30
        'user_update',
31
    );
32
33
    public function getDaftarRetribusi()
34
    {
35
        return $this->belongsTo('Bantenprov\DaftarRetribusi\Models\DaftarRetribusiModel', 'daftar_retribusi_id');
36
    }
37
38
    public function getUserCreated()
39
    {
40
        return $this->belongsTo('App\User','user_id');
41
    }
42
43
    public function getUserUpdated()
44
    {
45
        return $this->belongsTo('App\User','user_update');
46
    }
47
48
}