<?php

namespace App\Models\Fish;

use Illuminate\Database\Eloquent\Model;

class FishMarineGridCache extends Model
{
    protected $table = 'fish_marine_grid_cache';

    protected $fillable = [
        'lat', 'lon', 'snapshot_date',
        'chlorophyll_mg_m3', 'current_speed_m_s', 'current_direction_deg',
        'dataset_key',
    ];

    protected function casts(): array
    {
        return [
            'lat' => 'decimal:7',
            'lon' => 'decimal:7',
            'snapshot_date' => 'date',
            'chlorophyll_mg_m3' => 'decimal:6',
            'current_speed_m_s' => 'decimal:6',
            'current_direction_deg' => 'decimal:4',
        ];
    }
}
