*/ class IntegrationWebhookEventFactory extends Factory { protected $model = IntegrationWebhookEvent::class; /** * Define the model's default state. * * @return array */ public function definition(): array { $receivedAt = $this->faker->dateTimeBetween('-2 days', 'now'); $processedAt = (clone $receivedAt)->modify('+2 minutes'); return [ 'provider' => $this->faker->randomElement(['paddle', 'revenuecat']), 'event_id' => $this->faker->uuid(), 'event_type' => $this->faker->word(), 'status' => IntegrationWebhookEvent::STATUS_PROCESSED, 'received_at' => $receivedAt, 'processed_at' => $processedAt, 'failed_at' => null, 'error_message' => null, 'context' => [], ]; } }