Path: blob/1.0-develop/database/Factories/BackupFactory.php
7458 views
<?php12namespace Database\Factories;34use Ramsey\Uuid\Uuid;5use Carbon\CarbonImmutable;6use Pterodactyl\Models\Backup;7use Illuminate\Database\Eloquent\Factories\Factory;89class BackupFactory extends Factory10{11/**12* The name of the factory's corresponding model.13*14* @var string15*/16protected $model = Backup::class;1718/**19* Define the model's default state.20*/21public function definition(): array22{23return [24'uuid' => Uuid::uuid4()->toString(),25'name' => $this->faker->sentence,26'disk' => Backup::ADAPTER_WINGS,27'is_successful' => true,28'created_at' => CarbonImmutable::now(),29'completed_at' => CarbonImmutable::now(),30];31}32}333435