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.

57 lines
1.5 KiB

2 years ago
  1. <?php
  2. namespace Database\Factories;
  3. use DateTime;
  4. use Illuminate\Database\Eloquent\Factories\Factory;
  5. /**
  6. * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Collection>
  7. */
  8. class CollectionFactory extends Factory
  9. {
  10. /**
  11. * Define the model's default state.
  12. *
  13. * @return array<string, mixed>
  14. */
  15. public function definition()
  16. {
  17. return [
  18. "name" => fake()->name(),
  19. "public" => "public",
  20. "disk" => "local",
  21. "count" => rand(3,18),
  22. "tmp_support" => rand(0,1),
  23. "remove_tmp_time" => 132,
  24. "max_file_size" => rand(300,2000),
  25. "min_file_size" => rand(300,2000),
  26. "max_width" => rand(300,2000),
  27. "min_width" => rand(300,2000),
  28. "max_height" => rand(300,2000),
  29. "min_height" => rand(300,2000),
  30. "alt_required" => rand(0,1),
  31. "description_required" => rand(0,1),
  32. "exts" => [
  33. "jpg",
  34. "jpeg",
  35. "png",
  36. "webp"
  37. ],
  38. "avalible_exts" => [
  39. "jpg",
  40. "jpeg",
  41. "png",
  42. "webp"
  43. ],
  44. "memetypes" => [
  45. "jpg",
  46. "jpeg",
  47. "png",
  48. "webp"
  49. ],
  50. "model" => fake()->name(),
  51. "expire_date" => "2022-07-27 09:17:59"
  52. ];
  53. }
  54. }