update all model factories

This commit is contained in:
Matthew Penner
2021-01-15 18:01:48 -07:00
parent c18e186589
commit d550d770da
18 changed files with 759 additions and 212 deletions

View File

@@ -2,6 +2,7 @@
namespace Database\Factories;
use Illuminate\Support\Str;
use Pterodactyl\Models\Node;
use Illuminate\Database\Eloquent\Factories\Factory;
@@ -21,6 +22,23 @@ class NodeFactory extends Factory
*/
public function definition(): array
{
return [];
return [
'uuid' => Uuid::uuid4()->toString(),
'public' => true,
'name' => $this->faker->firstName,
'fqdn' => $this->faker->ipv4,
'scheme' => 'http',
'behind_proxy' => false,
'memory' => 1024,
'memory_overallocate' => 0,
'disk' => 10240,
'disk_overallocate' => 0,
'upload_size' => 100,
'daemon_token_id' => Str::random(Node::DAEMON_TOKEN_ID_LENGTH),
'daemon_token' => encrypt(Str::random(Node::DAEMON_TOKEN_LENGTH)),
'daemonListen' => 8080,
'daemonSFTP' => 2022,
'daemonBase' => '/var/lib/pterodactyl/volumes',
];
}
}