Completed
Push — master ( 72282c...462347 )
by
unknown
9s
created

TarifModel::getUserUpdated()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Bantenprov\PelayananKesehatan\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 = 'tarifs';
12
    public $timestamps = true;
13
14
    use SoftDeletes;
15
16
    protected $dates = ['deleted_at'];
17
    protected $fillable = [
18
        'uuid',
19
        'uraian',
20
        'tarif',
21
        'jasa_pelayanan',
22
        'jasa_sarana',
23
        'satuan',
24
        'master_tarif_id',
25
        'user_id',
26
        'user_update',
27
    ];
28
29
    public function getMasterTarif()
30
    {
31
        return $this->hasOne('Bantenprov\MasterTarif\Models\MasterTarifModel', 'id');
32
    }
33
34
    public function getUserCreated()
35
    {
36
        return $this->belongsTo('App\User','user_id');
37
    }
38
39
    public function getUserUpdated()
40
    {
41
        return $this->belongsTo('App\User','user_update');
42
    }
43
44
    public function getItem()
45
    {
46
        return $this->hasMany('Item', 'id');
47
    }
48
49
}
50