initial round of changes from Claude

This commit is contained in:
2026-01-09 15:01:27 -07:00
parent 4dbbef643b
commit a086d749d1
11 changed files with 876 additions and 71 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\WeatherReport>
*/
class WeatherReportFactory extends Factory
{
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'type' => fake()->randomElement(['hourly', 'weekly']),
'reported_at' => fake()->dateTimeBetween('-7 days', 'now'),
'generated_at' => fake()->dateTimeBetween('-7 days', 'now'),
'latitude' => fake()->latitude(39, 42),
'longitude' => fake()->longitude(-112, -110),
'elevation_meters' => fake()->randomFloat(4, 1000, 2000),
];
}
public function hourly(): static
{
return $this->state(fn (array $attributes) => [
'type' => 'hourly',
]);
}
public function weekly(): static
{
return $this->state(fn (array $attributes) => [
'type' => 'weekly',
]);
}
}