first commit from hostslim
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\AnalyticsSession;
|
||||
use App\Models\Event;
|
||||
use App\Models\Visitor;
|
||||
use App\Models\Website;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<Event> */
|
||||
class EventFactory extends Factory
|
||||
{
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'website_id' => Website::factory(),
|
||||
'visitor_id' => Visitor::factory(),
|
||||
'analytics_session_id' => AnalyticsSession::factory(),
|
||||
'name' => fake()->randomElement(['click', 'signup', 'purchase', 'download']),
|
||||
'category' => fake()->randomElement(['engagement', 'conversion', 'navigation']),
|
||||
'action' => fake()->word(),
|
||||
'label' => fake()->word(),
|
||||
'value' => fake()->optional(0.5)->randomFloat(2, 1, 100),
|
||||
'properties' => null,
|
||||
'occurred_at' => now(),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user