BookStack/database/factories/Exports/ImportFactory.php
Dan Brown 92cfde495e
ZIP Imports: Added full contents view to import display
Reduced import data will now be stored on the import itself, instead of
storing a set of totals.
2024-11-05 13:17:31 +00:00

32 lines
736 B
PHP

<?php
namespace Database\Factories\Exports;
use BookStack\Users\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class ImportFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = \BookStack\Exports\Import::class;
/**
* Define the model's default state.
*/
public function definition(): array
{
return [
'path' => 'uploads/imports/' . Str::random(10) . '.zip',
'name' => $this->faker->words(3, true),
'type' => 'book',
'metadata' => '{"name": "My book"}',
'created_at' => User::factory(),
];
}
}