41 lines
892 B
PHP
41 lines
892 B
PHP
<?php
|
||
|
||
namespace App\Models;
|
||
|
||
use Illuminate\Database\Eloquent\Model;
|
||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
||
class EventMeta extends Model
|
||
{
|
||
protected $table = 'event_meta';
|
||
protected $primaryKey = 'event_id';
|
||
public $incrementing = false;
|
||
|
||
protected $fillable = [
|
||
'title',
|
||
'description',
|
||
'location',
|
||
'all_day',
|
||
'category',
|
||
'reminder_minutes',
|
||
'is_private',
|
||
'start_at',
|
||
'end_at',
|
||
'extra',
|
||
];
|
||
|
||
protected $casts = [
|
||
'all_day' => 'boolean',
|
||
'is_private' => 'boolean',
|
||
'start_at' => 'datetime',
|
||
'end_at' => 'datetime',
|
||
'extra' => 'array',
|
||
];
|
||
|
||
/* back-reference to Sabre’s calendarobjects row */
|
||
public function event(): BelongsTo
|
||
{
|
||
return $this->belongsTo(Event::class, 'event_id');
|
||
}
|
||
}
|