|
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
|
|
|
|