<?php

namespace App\Models;

use Database\Factories\WeeklyForecastFactory;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

#[Fillable([
    'forecast_for',
    'model_version',
    'direction',
    'magnitude_pence',
    'ridge_confidence',
    'flagged_duty_change',
    'reasoning',
    'generated_at',
])]
class WeeklyForecast extends Model
{
    /** @use HasFactory<WeeklyForecastFactory> */
    use HasFactory;

    protected function casts(): array
    {
        return [
            'forecast_for' => 'date',
            'magnitude_pence' => 'integer',
            'ridge_confidence' => 'integer',
            'flagged_duty_change' => 'boolean',
            'generated_at' => 'datetime',
        ];
    }
}
