Completed
Push — master ( c612e9...50e7fd )
by
unknown
10s
created

Nilai   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 38
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 2

4 Methods

Rating   Name   Duplication   Size   Complexity  
A siswa() 0 4 1
A prestasi() 0 4 1
A sktm() 0 4 1
A user() 0 4 1
1
<?php 
2
3
namespace Bantenprov\Nilai\Models\Bantenprov\Nilai;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\SoftDeletes;
7
8
class Nilai extends Model
9
{
10
    use SoftDeletes;
11
12
    public $timestamps = true;
13
14
    protected $table = 'nilais';
15
    protected $dates = [
16
        'deleted_at'
17
    ];
18
    protected $fillable = [
19
        'nomor_un',
20
        'siswa_id',
21
        'akademik_id',
22
        'prestasi_id',
23
        'zona_id',
24
        'sktm_id',
25
        'user_id'        
26
        
27
    ];
28
29
    public function siswa()
30
    {
31
        return $this->belongsTo('Bantenprov\Siswa\Models\Bantenprov\Siswa\Siswa','siswa_id');
32
    }
33
    public function prestasi()
34
    {
35
        return $this->belongsTo('Bantenprov\Prestasi\Models\Bantenprov\Prestasi\Prestasi','prestasi_id');
36
    }
37
    public function sktm()
38
    {
39
        return $this->belongsTo('Bantenprov\Sktm\Models\Bantenprov\Sktm\Sktm','sktm_id');
40
    }
41
    public function user()
42
    {
43
        return $this->belongsTo('App\User','user_id');
44
    }
45
}
46