Passed
Push — master ( 4c85b9...e180ca )
by Arthur
36:55
created

Client   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 34
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A application() 0 3 1
A machine() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: arthur
5
 * Date: 21.02.19
6
 * Time: 18:16
7
 */
8
9
namespace Modules\Client\Entities;
10
11
12
use Foundation\Contracts\Ownable;
13
use Foundation\Traits\ModelFactory;
14
use Foundation\Traits\OwnedByUser;
15
use Jenssegers\Mongodb\Eloquent\SoftDeletes;
16
use Modules\Application\Entities\Application;
17
use Modules\Machine\Entities\Machine;
18
use Modules\Mongo\Abstracts\MongoModel;
19
use Modules\User\Entities\User;
20
21
class Client extends MongoModel implements Ownable
22
{
23
    use OwnedByUser, ModelFactory, SoftDeletes;
24
25
    /**
26
     * @var string
27
     */
28
    protected $collection = 'clients';
29
30
    /**
31
     * @var array
32
     */
33
    protected $guarded = [];
34
35
    protected $casts = [
36
    ];
37
38
    protected $dates = [
39
        'created_at',
40
        'updated_at',
41
        'deleted_at',
42
        'last_heartbeat',
43
        'started_at',
44
        'closed_at'
45
    ];
46
47
    public function application()
48
    {
49
        return $this->belongsTo(Application::class);
50
    }
51
52
    public function machine()
53
    {
54
        return $this->belongsTo(Machine::class);
55
    }
56
57
}