mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-05-01 20:33:45 +02:00
get factories to use other uuid generator rather than faker
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Pterodactyl\Models\Egg;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
@@ -22,7 +23,7 @@ class EggFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'uuid' => $this->faker->unique()->uuid,
|
||||
'uuid' => Uuid::uuid4()->toString(),
|
||||
'name' => $this->faker->name,
|
||||
'description' => implode(' ', $this->faker->sentences()),
|
||||
'startup' => 'java -jar test.jar',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Pterodactyl\Models\Nest;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
@@ -22,7 +23,7 @@ class NestFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'uuid' => $this->faker->unique()->uuid,
|
||||
'uuid' => Uuid::uuid4()->toString(),
|
||||
'author' => 'testauthor@example.com',
|
||||
'name' => $this->faker->word,
|
||||
'description' => null,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Illuminate\Support\Str;
|
||||
use Pterodactyl\Models\Node;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
@@ -24,7 +25,7 @@ class NodeFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'uuid' => $this->faker->unique()->uuid,
|
||||
'uuid' => Uuid::uuid4()->toString(),
|
||||
'public' => true,
|
||||
'name' => $this->faker->firstName,
|
||||
'fqdn' => $this->faker->ipv4,
|
||||
|
||||
@@ -26,7 +26,7 @@ class ServerFactory extends Factory
|
||||
{
|
||||
return [
|
||||
'uuid' => Uuid::uuid4()->toString(),
|
||||
'uuidShort' => Str::random(8),
|
||||
'uuidShort' => Str::lower(Str::random(8)),
|
||||
'name' => $this->faker->firstName,
|
||||
'description' => implode(' ', $this->faker->sentences()),
|
||||
'skip_scripts' => 0,
|
||||
@@ -36,10 +36,12 @@ class ServerFactory extends Factory
|
||||
'disk' => 512,
|
||||
'io' => 500,
|
||||
'cpu' => 0,
|
||||
'threads' => null,
|
||||
'oom_disabled' => 0,
|
||||
'installed' => 1,
|
||||
'database_limit' => null,
|
||||
'allocation_limit' => null,
|
||||
'database_limit' => null,
|
||||
'backup_limit' => null,
|
||||
'created_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now(),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user