You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
1.7 KiB
74 lines
1.7 KiB
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use DateTime;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Collection>
|
|
*/
|
|
class CollectionFactory extends Factory
|
|
{
|
|
use BaseFactory;
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
"name" => fake()->name(),
|
|
"public" => rand(0, 1),
|
|
"disk" => "local",
|
|
"count" => rand(3, 18),
|
|
"remove_tmp_time" => "2022-07-27 09:17:59",
|
|
"max_file_size" => rand(300, 2000),
|
|
'alt_required' => false,
|
|
'description_required' => false,
|
|
'tmp_support' => true,
|
|
'max_width' => 2000,
|
|
'max_height' => 2000,
|
|
'min_width' => 1,
|
|
'min_height' => 1,
|
|
'min_file_size' => 0,
|
|
"exts" => [
|
|
"jpg",
|
|
"jpeg",
|
|
"png",
|
|
"webp"
|
|
],
|
|
"ext" => "webp",
|
|
"mimetypes" => [
|
|
"image/webp",
|
|
"image/png",
|
|
"image/jpeg",
|
|
"image/jpg"
|
|
],
|
|
"model" => fake()->name(),
|
|
"expire_date" => "2022-07-27 09:17:59"
|
|
];
|
|
}
|
|
|
|
public function testGeneratorConfig()
|
|
{
|
|
return [
|
|
'store' => '',
|
|
'update' => '',
|
|
'show' => '',
|
|
'delete' => '',
|
|
];
|
|
}
|
|
|
|
public function dependencyProvider($dependencyAttributes = [])
|
|
{
|
|
return [];
|
|
}
|
|
public function list()
|
|
{
|
|
return [
|
|
'name:gt'
|
|
];
|
|
}
|
|
}
|