mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-21 19:01:37 +00:00
30 lines
722 B
PHP
30 lines
722 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Enums\CommandExecutionStatus;
|
|
use App\Models\Command;
|
|
use App\Models\CommandExecution;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<\App\Models\CommandExecution>
|
|
*/
|
|
class CommandExecutionFactory extends Factory
|
|
{
|
|
protected $model = CommandExecution::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'command_id' => Command::factory(),
|
|
'status' => $this->faker->randomElement([
|
|
CommandExecutionStatus::COMPLETED,
|
|
CommandExecutionStatus::FAILED,
|
|
CommandExecutionStatus::EXECUTING,
|
|
]),
|
|
'variables' => [],
|
|
];
|
|
}
|
|
}
|