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.
52 lines
1.4 KiB
52 lines
1.4 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
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition()
|
|
{
|
|
return [
|
|
"name" => fake()->name(),
|
|
"public" => "public",
|
|
"disk" => "local",
|
|
"count" => rand(3,18),
|
|
"tmp_support" => rand(0,1),
|
|
"remove_tmp_time" => 132,
|
|
"max_file_size" => rand(300,2000),
|
|
"min_file_size" => rand(300,2000),
|
|
"max_width" => rand(300,2000),
|
|
"min_width" => rand(300,2000),
|
|
"max_height" => rand(300,2000),
|
|
"min_height" => rand(300,2000),
|
|
"alt_required" => rand(0,1),
|
|
"description_required" => rand(0,1),
|
|
"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"
|
|
];
|
|
}
|
|
}
|