sintonia_webapp/app/Models/Show/ShowDays.php

44 lines
949 B
PHP

<?php
namespace App\Models\Show;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
class ShowDays extends Model
{
protected $table = 'cc_show_days';
protected $fillable = [
'first_show',
'last_show',
'start_time',
'timezone',
'duration',
'day',
'repeat_type',
'next_pop_date',
'show_id',
'record',
];
protected $casts = [
'first_show' => 'date',
'last_show' => 'date',
'start_time' => 'datetime',
'timezone' => 'string',
'duration' => 'string',
'day' => 'int',
'repeat_type' => 'int',
'next_pop_date' => 'date',
'show_id' => 'int',
'record' => 'int'
];
public function show(): BelongsTo
{
return $this->belongsTo(Show::class, 'show_id');
}
}