Passed
Pull Request — master (#25)
by
unknown
04:11
created

ChequeDetail   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 33
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A updatedBy() 0 3 1
A Payment() 0 3 1
A createdBy() 0 3 1
1
<?php
2
3
namespace App;
4
5
use Sofa\Eloquence\Eloquence;
6
use Illuminate\Database\Eloquent\Model;
7
8
class ChequeDetail extends Model
9
{
10
    protected $table = 'trn_cheque_details';
11
12
    protected $fillable = [
13
            'payment_id',
14
            'number',
15
            'date',
16
            'status',
17
            'created_by',
18
            'updated_by',
19
     ];
20
21
    //Eloquence Search mapping
22
    use Eloquence;
23
24
    protected $searchableColumns = [
25
        'number' => 20,
26
    ];
27
28
    public function createdBy()
29
    {
30
        return $this->belongsTo('App\User', 'created_by');
31
    }
32
33
    public function updatedBy()
34
    {
35
        return $this->belongsTo('App\User', 'updated_by');
36
    }
37
38
    public function Payment()
39
    {
40
        return $this->belongsTo('App\PaymentDetail', 'payment_id');
41
    }
42
}
43