mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 03:26:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			797 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			797 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace Database\Factories;
 | 
						|
 | 
						|
use Ramsey\Uuid\Uuid;
 | 
						|
use Carbon\CarbonImmutable;
 | 
						|
use App\Models\Backup;
 | 
						|
use Illuminate\Database\Eloquent\Factories\Factory;
 | 
						|
 | 
						|
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 [
 | 
						|
            'uuid' => Uuid::uuid4()->toString(),
 | 
						|
            'name' => $this->faker->sentence(),
 | 
						|
            'disk' => Backup::ADAPTER_DAEMON,
 | 
						|
            'is_successful' => true,
 | 
						|
            'created_at' => CarbonImmutable::now(),
 | 
						|
            'completed_at' => CarbonImmutable::now(),
 | 
						|
            'ignored_files' => [],
 | 
						|
        ];
 | 
						|
    }
 | 
						|
}
 |