Completed
Push — master ( 592ea7...0d3d46 )
by
unknown
02:14 queued 51s
created

Pendaftaran   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

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