*/ 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(), ]; } }