Completed
Push — master ( 79dc99...137869 )
by
unknown
02:37 queued 10s
created

MasterTarifModel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 39
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
        'daftar_retribusi_id',
27
        'daftar_retribusi_uuid',
28
        'user_id',
29
        'user_update',
30
    );
31
32
    public function getDaftarRetribusi()
33
    {
34
        return $this->belongsTo('Bantenprov\DaftarRetribusi\Models\DaftarRetribusiModel', 'daftar_retribusi_id');
35
    }
36
37
    public function getUserCreated()
38
    {
39
        return $this->belongsTo('App\User','user_id');
40
    }
41
42
    public function getUserUpdated()
43
    {
44
        return $this->belongsTo('App\User','user_update');
45
    }
46
47
}