30 lines
724 B
PHP
30 lines
724 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
namespace App\Http\Resources;
|
||
|
|
|
||
|
|
use Illuminate\Http\Request;
|
||
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||
|
|
|
||
|
|
class AutomationNodeRunResource extends JsonResource
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @return array<string, mixed>
|
||
|
|
*/
|
||
|
|
public function toArray(Request $request): array
|
||
|
|
{
|
||
|
|
return [
|
||
|
|
'id' => $this->id,
|
||
|
|
'node_id' => $this->node_id,
|
||
|
|
'node_type' => $this->node_type->value,
|
||
|
|
'status' => $this->status->value,
|
||
|
|
'input' => $this->input,
|
||
|
|
'output' => $this->output,
|
||
|
|
'error' => $this->error,
|
||
|
|
'started_at' => $this->started_at,
|
||
|
|
'finished_at' => $this->finished_at,
|
||
|
|
];
|
||
|
|
}
|
||
|
|
}
|