Adds three resources under a new "Forecasting" navigation group: a full-CRUD WatchedEventResource for the Layer 5 volatility detector, plus read-only WeeklyForecastResource and BacktestResource so the ridge model output and its calibration can be inspected without SQL. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
36 lines
817 B
PHP
36 lines
817 B
PHP
<?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',
|
|
];
|
|
}
|
|
}
|