Completed
Push — master ( d96a7a...d56a4b )
by Mahmoud
04:03
created

TimeTracker   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A user() 0 4 1
1
<?php
2
3
namespace App\Containers\Tracker\Models;
4
5
use App\Containers\User\Models\User;
6
use App\Port\Model\Abstracts\Model;
7
8
/**
9
 * Class TimeTracker.
10
 *
11
 * @author Mahmoud Zalt <[email protected]>
12
 */
13
class TimeTracker extends Model
14
{
15
16
    const PENDING = 'PENDING';
17
    const FAILED = 'FAILED';
18
    const SUCCEEDED = 'SUCCEEDED';
19
20
    /**
21
     * The database table used by the model.
22
     *
23
     * @var string
24
     */
25
    protected $table = 'time_tracker';
26
27
    public $timestamps = false;
28
29
    /**
30
     * The attributes that are mass assignable.
31
     *
32
     * @var array
33
     */
34
    protected $fillable = [
35
        'open_at',
36
        'close_at',
37
        'status',
38
        'user_id',
39
    ];
40
41
    /**
42
     * The dates attributes.
43
     *
44
     * @var array
45
     */
46
    protected $dates = [
47
        'open_at',
48
        'close_at',
49
    ];
50
51
    /**
52
     * The attributes excluded from the model's JSON form.
53
     *
54
     * @var array
55
     */
56
    protected $hidden = [
57
58
    ];
59
60
    public function user()
61
    {
62
        return $this->belongsTo(User::class);
63
    }
64
65
}
66