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

TarifModel   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getMasterTarif() 0 4 1
A getUserCreated() 0 4 1
A getUserUpdated() 0 4 1
A getItem() 0 4 1
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