This commit is contained in:
Saeed Vaziry
2024-03-24 09:56:34 +01:00
committed by GitHub
parent 884f18db63
commit 4d051330d6
1055 changed files with 14493 additions and 20278 deletions

View File

@ -1,25 +0,0 @@
<?php
namespace Database\Factories;
use App\Models\Redirect;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
class RedirectFactory extends Factory
{
protected $model = Redirect::class;
public function definition(): array
{
return [
'site_id' => $this->faker->randomNumber(),
'mode' => $this->faker->randomNumber(),
'from' => $this->faker->word(),
'to' => $this->faker->word(),
'status' => $this->faker->word(),
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
];
}
}

View File

@ -1,26 +0,0 @@
<?php
namespace Database\Factories;
use App\Models\Script;
use App\Models\ScriptExecution;
use App\Models\Server;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Carbon;
class ScriptExecutionFactory extends Factory
{
protected $model = ScriptExecution::class;
public function definition(): array
{
return [
'user' => $this->faker->word(),
'finished_at' => Carbon::now(),
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
'script_id' => Script::factory(),
'server_id' => Server::factory(),
];
}
}

View File

@ -1,15 +0,0 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
class ScriptFactory extends Factory
{
public function definition(): array
{
return [
//
];
}
}

View File

@ -14,7 +14,7 @@ public function definition(): array
return [
'type' => 'test-log',
'name' => 'test.log',
'disk' => 'server-logs-local',
'disk' => 'server-logs',
];
}
}

View File

@ -14,7 +14,7 @@ public function definition(): array
{
return [
'profile' => $this->faker->word(),
'provider' => $this->faker->randomElement(\App\Enums\ServerProvider::getValues()),
'provider' => $this->faker->randomElement(config('core.server_providers')),
'credentials' => [],
'connected' => 1,
'user_id' => User::factory(),

View File

@ -11,8 +11,10 @@ public function definition(): array
{
return [
'profile' => $this->faker->word(),
'provider' => $this->faker->randomElement(\App\Enums\StorageProvider::getValues()),
'credentials' => [],
'provider' => $this->faker->randomElement(config('core.storage_providers')),
'credentials' => [
'token' => 'test-token',
],
'user_id' => User::factory(),
];
}