lots of progress

This commit is contained in:
Doar Mihai
2026-01-17 13:46:20 +02:00
parent ab5d3cae98
commit 030a105992
77 changed files with 8507 additions and 20 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace Database\Factories;
use App\Models\Site;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\UptimeCheck>
*/
class UptimeCheckFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
$statusCodes = [200, 200, 200, 200, 301, 302, 404, 500, 503]; // Weighted towards 200
return [
'site_id' => Site::factory(),
'status_code' => fake()->randomElement($statusCodes),
'response_time_ms' => fake()->numberBetween(50, 5000),
'checked_at' => fake()->dateTimeBetween('-30 days', 'now'),
];
}
}