mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
42 lines
958 B
PHP
42 lines
958 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Carbon\CarbonImmutable;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Pterodactyl\Models\Backup;
|
|
use Pterodactyl\Models\Server;
|
|
use Ramsey\Uuid\Uuid;
|
|
|
|
/**
|
|
* @extends Factory<Backup>
|
|
*/
|
|
class BackupFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = Backup::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'server_id' => Server::factory()->withRelationships(),
|
|
'uuid' => Uuid::uuid4()->toString(),
|
|
'name' => fake()->sentence(),
|
|
'ignored_files' => [],
|
|
'disk' => Backup::ADAPTER_WINGS,
|
|
'is_successful' => true,
|
|
'created_at' => CarbonImmutable::now(),
|
|
'completed_at' => CarbonImmutable::now(),
|
|
];
|
|
}
|
|
}
|