Completed
Pull Request — master (#10)
by claudio
04:11
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
 */
26
class Caldav extends Model
27
{
28
    //TODO fillable and other fields
29
30
    /**
31
     * @var string
32
     */
33
    protected $primaryKey = 'calendar_id';
34
35
    /**
36
     * @var array
37
     */
38
    protected $touches = ['calendar'];
39
40
    /**
41
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
42
     */
43 4
    public function Calendar()
44
    {
45 4
        return $this->belongsTo(Calendar::class);
46
    }
47
48
    //TODO remmeber to don't allow to change timelsot for a caldav claendar
49
50
    /**
51
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
52
     */
53
    public function Employee()
54
    {
55
        $this->Calendar->Employee();
56
    }
57
}
58