38 lines
1.3 KiB
PHP
38 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use App\Models\ShowInstances\ShowInstances;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
/** @mixin ShowInstances */
|
|
class ShowInstancesResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'description' => $this->description,
|
|
'starts' => $this->starts,
|
|
'ends' => $this->ends,
|
|
'show_id' => $this->show_id,
|
|
'record' => $this->record,
|
|
'rebroadcast' => $this->rebroadcast,
|
|
'instance_id' => $this->instance_id,
|
|
'file_id' => $this->file_id,
|
|
'time_filled' => $this->time_filled,
|
|
'created' => $this->created,
|
|
'last_scheduled' => $this->last_scheduled,
|
|
'modified_instance' => $this->modified_instance,
|
|
'autoplaylist_built' => $this->autoplaylist_built,
|
|
'created_at' => $this->created_at,
|
|
'updated_at' => $this->updated_at,
|
|
|
|
'cc_file_id' => $this->cc_file_id,
|
|
'cc_show_id' => $this->cc_show_id,
|
|
|
|
'ccShow' => new ShowResource($this->whenLoaded('ccShow')),
|
|
];
|
|
}
|
|
}
|