47 lines
1 KiB
PHP
47 lines
1 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\ShowInstances\ShowInstances;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Schedule extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'cc_schedule';
|
|
|
|
protected $fillable = [
|
|
'starts',
|
|
'ends',
|
|
'clip_length',
|
|
'fade_in',
|
|
'fade_out',
|
|
'cue_in',
|
|
'cue_out',
|
|
'media_item_played',
|
|
'playout_status',
|
|
'broadcasted',
|
|
'position',
|
|
'file_id',
|
|
'instance_id'
|
|
];
|
|
|
|
protected $casts = [
|
|
'starts' => 'datetime',
|
|
'ends' => 'datetime',
|
|
'media_item_played' => 'boolean',
|
|
];
|
|
|
|
public function ccFile(): BelongsTo
|
|
{
|
|
return $this->belongsTo(File::class, 'cc_file_id');
|
|
}
|
|
|
|
public function ccShowInstance(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ShowInstances::class, 'cc_show_instance_id');
|
|
}
|
|
}
|