37 lines
1.1 KiB
PHP
37 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Hunts>
|
|
*/
|
|
class HuntsFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'creator_id' => \App\Models\User::factory(),
|
|
'title' => $this->faker->sentence(3),
|
|
'slug' => $this->faker->slug(),
|
|
'description' => $this->faker->paragraph(),
|
|
'status' => \App\Enums\HuntStatus::PUBLISHED,
|
|
'difficulty' => \App\Enums\HuntDifficulty::EASY,
|
|
'city' => $this->faker->city(),
|
|
'latitude' => $this->faker->latitude(),
|
|
'longitude' => $this->faker->longitude(),
|
|
'is_public' => true,
|
|
'estimated_duration_min' => $this->faker->numberBetween(30, 180),
|
|
'image' => $this->faker->imageUrl(),
|
|
'start_at' => now(),
|
|
'end_at' => null,
|
|
];
|
|
}
|
|
}
|