- Add AdminPanelProvider mounting panel at `/admin` with `is_admin` auth guard - Add `is_admin` boolean column to users table - Add brent_prices and price_predictions tables with appropriate indexes - Add comprehensive admin design spec covering resources, dashboard, navigation, and build order - Configure default panel with amber primary color and standard middleware stack - Add compiled Filament assets (actions.js, app.css)
36 lines
925 B
PHP
36 lines
925 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\PredictionSource;
|
|
use App\Enums\TrendDirection;
|
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
/**
|
|
* @property int $id
|
|
* @property Carbon $predicted_for
|
|
* @property PredictionSource $source
|
|
* @property TrendDirection $direction
|
|
* @property int $confidence
|
|
* @property string|null $reasoning
|
|
* @property Carbon $generated_at
|
|
*/
|
|
#[Fillable(['predicted_for', 'source', 'direction', 'confidence', 'reasoning', 'generated_at'])]
|
|
class PricePrediction extends Model
|
|
{
|
|
public $timestamps = false;
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'predicted_for' => 'date',
|
|
'source' => PredictionSource::class,
|
|
'direction' => TrendDirection::class,
|
|
'confidence' => 'integer',
|
|
'generated_at' => 'datetime',
|
|
];
|
|
}
|
|
}
|