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,56 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class WeatherPeriod extends Model
{
/** @use HasFactory<\Database\Factories\WeatherPeriodFactory> */
use HasFactory;
protected $fillable = [
'weather_report_id',
'period_number',
'name',
'start_time',
'end_time',
'is_daytime',
'temperature',
'temperature_unit',
'precipitation_probability',
'dewpoint_celsius',
'relative_humidity',
'wind_speed',
'wind_direction',
'icon_url',
'short_forecast',
'detailed_forecast',
];
/**
* @return array<string, string>
*/
protected function casts(): array
{
return [
'start_time' => 'datetime',
'end_time' => 'datetime',
'is_daytime' => 'boolean',
'temperature' => 'integer',
'precipitation_probability' => 'integer',
'dewpoint_celsius' => 'decimal:2',
'relative_humidity' => 'integer',
];
}
/**
* @return BelongsTo<WeatherReport, $this>
*/
public function report(): BelongsTo
{
return $this->belongsTo(WeatherReport::class, 'weather_report_id');
}
}