Files
fotospiel-app/database/factories/IntegrationWebhookEventFactory.php
Codex Agent fc3e6715db
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled
Add integrations health monitoring
2026-01-02 18:35:12 +01:00

38 lines
1.1 KiB
PHP

<?php
namespace Database\Factories;
use App\Models\IntegrationWebhookEvent;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\IntegrationWebhookEvent>
*/
class IntegrationWebhookEventFactory extends Factory
{
protected $model = IntegrationWebhookEvent::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
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' => [],
];
}
}