Completed
Push — master ( bc4e81...14a953 )
by claudio
04:04
created

Caldav::Employee()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace plunner;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * plunner\Caldav
9
 *
10
 * @property integer $calendar_id
11
 * @property string $url
12
 * @property string $username
13
 * @property string $password
14
 * @property string $calendar_name
15
 * @property \Carbon\Carbon $created_at
16
 * @property \Carbon\Carbon $updated_at
17
 * @property-read Calendar $Calendar
18
 * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereCalendarId($value)
19
 * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereUrl($value)
20
 * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereUsername($value)
21
 * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav wherePassword($value)
22
 * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereCalendarName($value)
23
 * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereCreatedAt($value)
24
 * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereUpdatedAt($value)
25
 * @property string $sync_errors
26
 * @method static \Illuminate\Database\Query\Builder|\plunner\Caldav whereSyncErrors($value)
27
 */
28
class Caldav extends Model
29
{
30
    //TODO fillable and other fields
31
32
    /**
33
     * @var string
34
     */
35
    protected $primaryKey = 'calendar_id';
36
37
    /**
38
     * @var array
39
     */
40
    protected $touches = ['calendar'];
41
42
    /**
43
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
44
     */
45 4
    public function Calendar()
46
    {
47 4
        return $this->belongsTo(Calendar::class);
48
    }
49
50
    //TODO remmeber to don't allow to change timelsot for a caldav claendar
51
52
    /**
53
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
54
     */
55
    public function Employee()
56
    {
57
        $this->Calendar->Employee();
58
    }
59
}
60