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

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
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. use BaseFactory;
  11. /**
  12. * Define the model's default state.
  13. *
  14. * @return array<string, mixed>
  15. */
  16. public function definition()
  17. {
  18. return [
  19. "name" => fake()->name(),
  20. "public" => rand(0, 1),
  21. "disk" => "local",
  22. "count" => rand(3, 18),
  23. "remove_tmp_time" => "2022-07-27 09:17:59",
  24. "max_file_size" => rand(300, 2000),
  25. 'alt_required' => false,
  26. 'description_required' => false,
  27. 'tmp_support' => true,
  28. 'max_width' => 2000,
  29. 'max_height' => 2000,
  30. 'min_width' => 1,
  31. 'min_height' => 1,
  32. 'min_file_size' => 0,
  33. "exts" => [
  34. "jpg",
  35. "jpeg",
  36. "png",
  37. "webp"
  38. ],
  39. "ext" => "webp",
  40. "mimetypes" => [
  41. "image/webp",
  42. "image/png",
  43. "image/jpeg",
  44. "image/jpg"
  45. ],
  46. "model" => fake()->name(),
  47. "expire_date" => "2022-07-27 09:17:59"
  48. ];
  49. }
  50. public function testGeneratorConfig()
  51. {
  52. return [
  53. 'store' => '',
  54. 'update' => '',
  55. 'show' => '',
  56. 'delete' => '',
  57. ];
  58. }
  59. public function dependencyProvider($dependencyAttributes = [])
  60. {
  61. return [];
  62. }
  63. public function list()
  64. {
  65. return [
  66. 'name:gt'
  67. ];
  68. }
  69. }