31 lines
795 B
PHP
31 lines
795 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Customer;
|
|
use App\Models\Instance;
|
|
use App\Models\Order;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/** @extends Factory<Instance> */
|
|
class InstanceFactory extends Factory
|
|
{
|
|
protected $model = Instance::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'customer_id' => Customer::factory(),
|
|
'order_id' => Order::factory(),
|
|
'plan' => 'start',
|
|
// Start auf der neuen Leiter: 30 GB Kontingent, 40 GB Platte.
|
|
'quota_gb' => 30,
|
|
'disk_gb' => 40,
|
|
'ram_mb' => 4096,
|
|
'cores' => 2,
|
|
'subdomain' => 'nc-'.$this->faker->unique()->numberBetween(1, 999999),
|
|
'status' => 'reserving',
|
|
];
|
|
}
|
|
}
|