2023-05-03 05:15:45 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Data;
|
|
|
|
|
|
|
|
use App\Enums\ProcessStatus;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
use Spatie\LaravelData\Data;
|
|
|
|
|
2023-05-03 06:24:34 +00:00
|
|
|
/**
|
|
|
|
* The parameters to execute a CoolifyTask, organized in a DTO.
|
|
|
|
*/
|
2023-05-03 05:15:45 +00:00
|
|
|
class CoolifyTaskArgs extends Data
|
|
|
|
{
|
|
|
|
public function __construct(
|
2023-09-15 13:34:25 +00:00
|
|
|
public string $server_uuid,
|
2023-05-03 05:15:45 +00:00
|
|
|
public string $command,
|
|
|
|
public string $type,
|
|
|
|
public ?string $type_uuid = null,
|
|
|
|
public ?Model $model = null,
|
2023-09-18 12:41:31 +00:00
|
|
|
public ?string $status = null ,
|
2023-06-07 13:39:08 +00:00
|
|
|
public bool $ignore_errors = false,
|
2023-05-03 05:15:45 +00:00
|
|
|
) {
|
2023-09-18 12:41:31 +00:00
|
|
|
if(is_null($status)){
|
|
|
|
$this->status = ProcessStatus::QUEUED->value;
|
|
|
|
}
|
2023-05-03 05:15:45 +00:00
|
|
|
}
|
|
|
|
}
|