*/ 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 */ 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 */ public function report(): BelongsTo { return $this->belongsTo(WeatherReport::class, 'weather_report_id'); } }