Completed
Push — master ( bf4c92...3d0f9a )
by Alex
04:55
created

SimulatorHistory::getUser()   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
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * Class SimulatorHistory
9
 * @package App
10
 */
11
class SimulatorHistory extends Model
12
{
13
14
    protected $table = "simulator_history";
15
16
    /**
17
     * The attributes that are mass assignable.
18
     *
19
     * @var array
20
     */
21
    protected $fillable = [
22
        'user_id',
23
        'name',
24
        'quantity_to_buy',
25
        'quote_to_buy',
26
        'price_to_buy',
27
        'quantity_to_sell',
28
        'quote_to_sell',
29
        'tax_percent_to_discount',
30
        'price_to_sell',
31
        'gains_or_losses'
32
    ];
33
34
35
    /**
36
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
37
     */
38
    public function getUser()
39
    {
40
        return $this->belongsTo(User::class);
41
    }
42
43
44
}
45